3v4l.org

run code in 300+ PHP versions simultaneously
<?php <?php class Foo { private $privateProperty = 'priv'; protected $protectedProperty = 'prot'; public $publicProperty = 'pub'; } $foo = new Foo(); $reflectionClass = new ReflectionClass($foo); $reflectionClass->getProperty('$protectedProperty')->setValue('foo'); //$reflectionProperty = $reflectionClass->getProperty('privateProperty'); //$reflectionProperty->setAccessible(true); //$reflectionProperty->setValue($foo, 'foobar'); var_dump( $foo ); ?>

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.0.20.0330.05720.30
7.0.10.0070.09020.07
7.0.00.0230.04020.30
5.6.170.0370.07720.50
5.6.160.0130.07320.70
5.6.150.0070.08318.16
5.6.140.0100.04718.15
5.6.130.0030.08318.28
5.6.120.0100.05020.89
5.6.110.0100.08321.00
5.6.100.0100.08021.00
5.6.90.0030.04721.10
5.6.80.0100.05020.38
5.5.310.0330.07320.41
5.5.300.0030.05317.95
5.5.290.0130.07017.95
5.5.280.0100.07020.84
5.5.270.0070.06020.79
5.5.260.0030.04320.79
5.5.250.0030.08320.50
5.5.240.0100.07320.15

preferences:
139.54 ms | 1394 KiB | 7 Q