366 solutions found in php-dev
Page 2 of 19votes
Consider: $xml = "l"; $xml = "vv"; echo $xml; This will echo `vv`. Why and how can I do multi-line string literals for...
votes
How can I remove the first 4 characters of a string using PHP?
votes
We have two PHP5 objects and would like to merge the content of one into the second. There are no notion of subclasses between them so the solutions described i...
votes
PHP - Is there a quick, on-the-fly method to test for a single character string, then prepend a leading zero? Example: $year = 11; $month = 4;...
votes
PHP 5.5 has been released and it features a new code caching module called OPCache, but there doesn't appear to be any documentation for it. So where is...
votes
Here is my code, ``` $url = 'url_to_post'; $data = array( "first_name" => "First name", "last_name" =>...
votes
It's got to be somewhere in the phpinfo() dump, but I just don't know where. Is it supposed to be under the "Additional Modules" section? So...
votes
Using PHP, what's the fastest way to convert a string like this: `"123"` to an integer? Why is that particular method the fastest? What happens...
votes
I understand PHP does not have a pure object variable, but I want to check whether a property is in the given object or class. $ob = (object) array('...
votes
I have a problem when I install 'Archive_Zip 0.1.1' on the Linux server, but when I try to run the script to create the zip file it gives the fatal erro...
votes
In PHP can I include a directory of scripts? i.e. Instead of: include('classes/Class1.php'); include('classes/Class2.php'); is...
votes
While I am installing Magento 2 on my Server, I got an error. After investigating the code and found that there are three dots (`...`), which is producing the e...
votes
I installed Laravel using Composer without problems, but when I try to run `laravel` in the terminal, I get the following error: > -bash: laravel: command...
votes
I need to send a pdf with mail, is it possible? $to = "xxx"; $subject = "Subject" ; $message = 'Example message with...
votes
I'm trying a simple web service example and I get this error even though I uncommented `extension=php_soap.dll` in the `php.ini` file: > **Fatal error...
votes
$items = Array(523,3452,334,31,...5346); Each item of this array is some number. **How do I get random item from `$items`?**
votes
Before you answer this I have never developed anything popular enough to attain high server loads. Treat me as (sigh) an alien that has just landed on the plane...
votes
I'm receiving a date string from an API, and it is formatted as `yyyy-mm-dd`. I am currently using a regex to validate the string format, which works ok,...
votes
I want to unzip a file and this works fine system('unzip File.zip'); But I need to pass in the file name through the URL and can not get it to...
votes
What does a `\` do in PHP? For example, [CSRF4PHP](https://github.com/foxbunny/CSRF4PHP/blob/60d9172b7f0cd93346cac9065fb17182854ebf1c/CsrfToken.php#L80-L87)...