Skip to content

Php display_errors

I’m trying to make php show errors, right now all I get is a blank page. I’ve tried changing the php.ini file that seems to be the php configuration file but to no success. Could it be that phpinfo() …

Passing $_POST/$_GET as a parameter to function

I came across an interesting piece of PHP code which has me a bit stumped as to why the author has chosen to do this. It got me thinking about why someone would want to pass $_POST as a variable and just not access it directly inside the function? The only benefit I could think of (and this was a

PHP Mocking Final Class

I am attempting to mock a php final class but since it is declared final I keep receiving this error: PHPUnit_Framework_Exception: Class “DoctrineORMQuery” is declared “final” and cannot be mocked. Is there anyway to get around this final behavior just for my unit tests without introdu…

Pushing a sub array into the same array

I am trying to put content of one array into the same array. Here I have an array $mclass with values such as You can see I have room_id index with 1,3,5 value. Now, I want to explode the room_id and get duplicate of same array index data with change of room_id and push into the array. and finally delete

Show a 404 page if route not found in Laravel 5.1

I am trying to figure out to show 404 page not found if a route is not found. I followed many tutorials, but it doesn’t work. I have 404.blade.php in laravelresourcesviewserrors Also in handler….