<?
class A{
public funcrtion __construct(){
echo 'world';
}
}
class B extends A{
public function __construct(){
echp 'b';
}
}
$c = new B();
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
<?
class A{
public funcrtion __construct(){
echo 'world';
}
}
class B extends A{
public function __construct(){
echp 'b';
}
}
$c = new B();
Output for 8.0.13
Parse error: syntax error, unexpected identifier "__construct", expecting variable in /in/fmg5v on line 4
Process exited with code 255.
Output for 7.4.33
Parse error: syntax error, unexpected '__construct' (T_STRING), expecting variable (T_VARIABLE) in /in/fmg5v on line 4
Process exited with code 255.
Output for 7.3.32 - 7.3.33
Parse error: syntax error, unexpected 'funcrtion' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in /in/fmg5v on line 4
Process exited with code 255.
Output for 5.6.0 - 5.6.24, 7.0.0 - 7.0.9
Parse error: syntax error, unexpected 'funcrtion' (T_STRING), expecting variable (T_VARIABLE) in /in/fmg5v on line 4
Process exited with code 255.