366 solutions found in php-dev
Page 9 of 19votes
What are the differences? Is there a specific situation or reason for each function? If yes, can you give some examples of those situations? PHP.net says...
votes
I am using [xdebug][1] (php_xdebug-2.1.2-5.3-vc9.dll) on [WAMP][2]. When I use `var_dump` on a large object or variable it does not show the full variable....
votes
Is it safe to pass raw base64 encoded strings via GET parameters?
votes
I have a Boolean variable which I want to convert to a string: $res = true; I need the converted value to be of the format: `"true" "fa...
votes
How can I match a space character in a PHP regular expression? I mean like "gavin schulz", the space in between the two words. I am using a regular...
votes
I have two tables, `User` and `Post`. One `User` can have many `posts` and one `post` belongs to only one `user`. In my `User` model I have a `hasMany` rela...
votes
I'm looking for a way to print the call stack in PHP. Bonus points if the function flushes the IO buffer.
votes
What is the difference between `var_dump()` and `print_r()` in terms of spitting out an array as string?
votes
How to calculate minute difference between two date-times in PHP?
votes
**Here is my controller:** <?php namespace App\Http\Controllers\Api; use App\Http\Controllers\Controller; use Illuminate\Http\Reque...
votes
I'm planning to use PHP for a simple requirement. I need to download a XML content from a URL, for which I need to send HTTP GET request to that URL. Ho...
votes
*Preface: I'm attempting to use the repository pattern in an MVC architecture with relational databases.* I've recently started learning TDD in PHP,...
votes
Is there a PHP function that can do that? I'm using `strpos` to get the position of a substring and I want to insert a `string` after that position.
votes
I'm using PHP's function `file_get_contents()` to fetch contents of a URL and then I process headers through the variable `$http_response_header`. No...
votes
I have a PHP script that needs to make responses with HTTP response codes (status-codes), like HTTP 200 OK, or some 4XX or 5XX code. How can I do this in PHP...
votes
I'm running laravel 5.4 on Ubuntu 16.04 server with PHP7. trying to install `cviebrock/eloquent-sluggable` package throw some error: pish@let:/home...
votes
I have been directed to use the method `php://input` instead of `$_POST` when interacting with Ajax requests from JQuery. What I do not understand is the benefi...
votes
In certain other languages ([ActionScript 3][1] for example), it has been noted that initializing a new array is faster if done like this `var foo = []` rather...
votes
Simple, right? Well, this isn't working :-\ $skuList = explode('\n\r', $_POST['skuList']);
votes
So I've been doing some digging around and I've been trying to piece together a function that generates a valid v4 UUID in PHP. This is the closest I...