php

quality of quercus translation?

have someone used quercus to translate php into bytecode? if you got a big php application, will the translation be flawless? it sounds to me very impossible to just translate everything without error in code like that. but they claim on their web page that mediawiki and other popular websites (joomla to i think) use it. and my php cod...

Useage of variables in XML file

My XML file look like this: <?xml versiion="1.0" encoding "utf-8"?> <graph caption='chart' xAxisName='songs' yAxisName='votes' showNames='0' decimalPrecision='0' formatNumberScale='0'> <set name='song name' value='1233' color='AFD8F8' /> <set name='song name' value='857' color='F6BD0F' /> <set name='song name' value='671' color='8BB...

HipHop PHP (was Hyper PHP by Facebook)

Following this rather comical interview with a Facebook "employee"... Does anybody have any details on the Hyper PHP that those smart as balls Facebook guys have developed? ...

Uppercase code completion in Netbeans

Can I configure Netbeans to autocomplete code when I type the capital letters? E.g. Z displays completion list starting with the letter Z, e.g. Zend_…, then I type vh, and the list is limited to this items, which have the capital letters Z, V, H in it, e.g. Zend_View_Helper_…. Does Netbeans support this bevaviour? ...

Logics between php mail(), sendmail(), using SMTP in php

what is the main Logics between php mail(), sendmail(), using SMTP in php why we are creating [email protected], [email protected],... and so on. Is there any problem in this? WE are building Newsletter management which we try to sent minimum 6000 mails per day. Our domain is in dedicated sever. WE are trying to sent 10,000 mails...

PHP code polisher - exists anywhere?

Could you please recommend some software that will do PHP code polishing according to pre-defined formatting rules? Thanks! ...

Performing wordpress search from a plugin

What's the correct way of performing an article search from within a Wordpress plugin? I want to perform the search and get a list of matching posts and pages back. That is I want the list back in the plugin code for further processing. I keep thinking there should be a function I can call, but I can't find it. ...

Regex to replace integer between two pound / hash symbols in php

Looking to replace: #678# with <span id="note-678"></span> ...

Add scripts to overall layout from within a controller

Hi, I'm using Zend_view/Zend_Layout but i want to be able to append scripts to the overall template depending on the controller, so within the controller i could do something like: public function someAction() { $something->headScript()->appendFile('script.js','text/javascript'); // etc etc } I have enabled Zend_view/Zend_Lay...

Help, first codeigniter application

Help, this is my first Codeigniter app and I am having the strangest problem, the View is not getting the values of the variables from the database. I followed this tutorial, and instead, when I load the page, the values from the foreach loop show like this $value instead of displaying the actual contents in the database. I'm confused! ...

Is it possible to fill in an Ajax form programatically using php?

Hi, I am using php to fill up a form. Now, it so happens that form is using ajax for many of its fields. e.g. select [country] (ajax will show drop-down filled with states for that country) select [states] (ajax will show drop-down filled with cities) select [city] (ajax will enable a submit button) If it is a simple html bas...

Merge files into a single PDF using PHP/linux

I'm investigating how one can combine multiple PDF's into a single PDF. I'm looking for a library that is as reliable and robust as possible. Preferable a library that can preserve bookmarks. Ghostscript can concat where the bookmarks are preserved, but I experienced trouble where it in one case failed to generate any output.pdf. gs -...

What could be the problem with this array?

This is the source $pData array I have: Array ( [code] => 105132 [globalImages] => Array ( [0] => 1148-1578-image_41ddeeef69eb94a8d9ccc1503d099810.jpg ) [envImages] => Array ( [0] => 1148-0-image_72e95c6424ec7bcd90994f1c0a3f4544.jpg ) [attribs] => Array ( ...

Add HTML placeholder into Zend_Form

I'm using Zend_Form for an application form using this code: class Form_ApplicationForm extends Zend_Form { public function init() { $this->setAction('/application/new') ->setMethod('post') ->setAttrib('id','application'); $name = new Zend_Form_Element_Text('name'); $name->setLa...

Prevent timeout in PHP

Hi guys, I am working on a PHP script that makes an API call to a external site. However, if this site is not available or the request times out, I would like my function to return false. I have found following, but I am not sure on how to implement it on my script, since i use "file_get_contents" to retrieve the content of the externa...

findByExample in Doctrine

Hi, Is there a method in doctrine like hibernate findByExample method? thanks ...

"Invalid argument supplied for foreach()" - What happens next?

If "Invalid argument supplied for foreach()" is a "warning" in PHP and doesn't halt execution, where does the script execution continue from? After the foreach block? After the function? What happens next? ...

Prevent downloading of a http content body

Hi. Currently I've got a web app that retrieves the URL of a mp3 on an external server, but to conserve data I'd like to check first that the page my server is retrieving is actually a redirect, not the actual content (so I can grab the URL of the mp3 and NOT the actual mp3 itself. The external PHP script requires that json data is ...

Value objects vs associative arrays in PHP

(This question uses PHP as context but isn't restricted to PHP only. e.g. Any language with built in hash is also relevant) Let's look at this example (PHP): function makeAFredUsingAssoc() { return array( 'id'=>1337, 'height'=>137, 'name'=>"Green Fred"); } Versus: class Fred { public $id; public $...

Twitter API help please

Hi , I am trying to create a feed on a site which displays all the tweets which are about me so say if some one says " @oli hello how are you?" I would like it to display seperatley from my twitter feed. is this possible if so could you try and explain how to do it using php and also if u could provide a link that would be great T...