Skip to content

Instantly share code, notes, and snippets.

@notian
Last active March 29, 2018 14:05
Show Gist options
  • Save notian/1b635b236f4bb9f20880b467ac2ea4d9 to your computer and use it in GitHub Desktop.
Save notian/1b635b236f4bb9f20880b467ac2ea4d9 to your computer and use it in GitHub Desktop.
PHP 5.6 -> 7 quirk
echo "A";
echo include(__DIR__.'/include.php');
echo "C";
<?php
if( function_exists( 'strpos' )) return 'B';
{
function strpos()
{
return false;
}
}
@notian
Copy link
Author

notian commented Mar 29, 2018

PHP 5.6 output

ABC

PHP 7

A
PHP Fatal error:  Cannot redeclare strpos()
on line 7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment