3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Foo { public function bar(string $stuff): Generator; } class Baz { public function bar(string $stuff): Array { yield $stuff; return []; // breaks } } $baz = new Baz; $g = $baz->bar("Hello PHP!"); foreach ($g as $value) { var_dump($value); }

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.2.70.0380.00714.61
7.2.60.0330.01014.82
7.2.50.0320.01414.66
7.2.40.0310.00414.87
7.2.30.0280.00714.89
7.2.20.0310.01414.53
7.2.10.0360.01114.93
7.2.00.0240.01014.77
7.1.170.0370.00413.57
7.1.160.0370.01013.54
7.1.150.0330.00713.83
7.1.140.0260.02013.63
7.1.130.0250.00613.37
7.1.120.1250.00613.65
7.1.110.0310.00013.66
7.1.100.0300.00313.69
7.1.90.0390.01013.33
7.1.80.0410.01313.75
7.1.70.0430.00713.57
7.1.60.0600.00631.74
7.1.50.0670.01731.53
7.1.40.0670.01931.74
7.1.30.0780.01731.75
7.1.20.0240.01531.65
7.1.10.0490.00913.52
7.1.00.0450.00613.55

preferences:
180.55 ms | 1193 KiB | 7 Q