3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { function __constructor(){} } $a = null; $f = new Foo($a = PHP_VERSION); var_dump($a);
Output for 7.3.0rc4
string(8) "7.3.0RC4"
Output for 7.3.0rc3
string(8) "7.3.0RC3"
Output for 7.3.0beta1
string(10) "7.3.0beta1"
Output for 7.3.0alpha1
string(11) "7.3.0alpha1"
Output for 7.2.6
string(5) "7.2.6"
Output for 7.2.0
string(5) "7.2.0"
Output for 7.1.20
string(6) "7.1.20"
Output for 7.1.10
string(6) "7.1.10"
Output for 7.1.7
string(5) "7.1.7"
Output for 7.1.6
string(5) "7.1.6"
Output for 7.1.5
string(5) "7.1.5"
Output for 7.1.0
string(5) "7.1.0"
Output for 4.3.0 - 7.0.20
NULL