3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function __get( $property ) { if ( 'bla' === $property ) { echo 'Initializing Text->bla' . PHP_EOL; $this->bla = 'Value'; return $this->bla; } $message = sprintf( 'Undefined property: %s::$%s', get_class(), $property ); trigger_error( $message, E_USER_NOTICE); return null; } } $test = new Test(); echo $test->bla[2] . PHP_EOL; unset $test->bla[2]; echo $test->bla . PHP_EOL; echo $test->bla . PHP_EOL; echo $test->bla . PHP_EOL; echo $test->kaka . PHP_EOL; echo $test->bla . PHP_EOL;

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.1.70.0020.01816.94
7.1.60.0160.01735.05
7.1.50.0200.01334.41
7.1.40.0140.01934.05
7.1.30.0220.01734.45
7.1.20.0310.01234.43
7.1.10.0080.01016.25
7.1.00.0070.01016.59
7.0.200.0000.01716.64
7.0.190.0040.01416.46
7.0.180.0050.01116.11
7.0.170.0070.01216.13
7.0.160.0020.01616.09
7.0.150.0160.00316.24
7.0.140.0070.00716.20
7.0.130.0110.00616.40
7.0.120.0090.01116.43
7.0.110.0050.01316.19
7.0.100.0110.00716.11
7.0.90.0030.01616.04
7.0.80.0060.01416.38
7.0.70.0030.01516.28
7.0.60.0050.01316.01
7.0.50.0100.01016.41
7.0.40.0090.00916.30
7.0.30.0080.00916.33
7.0.20.0060.00916.07
7.0.10.0060.00916.19
7.0.00.0030.01616.19

preferences:
145.33 ms | 1386 KiB | 7 Q