3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Toto { public function yieldData() { yield 'a'; yield 'b'; yield 'c'; } public function getData() { return [ 'a', 'b', 'c', ]; } } $toto = new Toto(); $data = $toto->getData() var_dump($data) foreach ($data as $i => $data) { var_dump($i, $data); } var_dump($toto->yieldData()); var_dump($toto->yieldData());

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.80.0060.01418.02
7.1.70.0210.01116.76
7.1.60.0270.00934.95
7.1.50.0240.01134.79
7.1.40.0160.01934.18
7.1.30.0200.01934.10
7.1.20.0190.01934.50
7.1.10.0160.00416.25
7.1.00.0080.01016.58
7.0.200.0090.01016.44
7.0.190.0120.00716.25
7.0.180.0110.00716.12
7.0.170.0100.01016.00
7.0.160.0070.01116.15
7.0.150.0120.00715.97
7.0.140.0030.01316.05
7.0.130.0030.02316.39
7.0.120.0070.01216.45
7.0.110.0000.01715.89
7.0.100.0090.01016.16
7.0.90.0120.00616.07
7.0.80.0070.01116.11
7.0.70.8900.00616.27
7.0.60.0110.00815.95
7.0.50.0080.01016.37
7.0.40.0040.01416.34
7.0.30.0100.00616.39
7.0.20.0000.01516.14
7.0.10.0060.00916.30
7.0.00.0030.01316.20

preferences:
139.33 ms | 1394 KiB | 7 Q