3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Model { private $id; public function setId($id) { $this->id = $id; } } $time = microtime(true); for ($i = 0; $i < 500000; $i++) { $model = new Model; $method = 'setId'; call_user_func_array(array($model, $method), array('test')); } $time = microtime(true) - $time; echo 'call user func took ' . number_format($time, 3) . ' seconds\n";

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)
5.4.170.0070.07718.84
5.4.160.0070.07319.11
5.4.150.0130.04719.20
5.4.140.0030.06016.39
5.4.130.0000.07716.45
5.4.120.0070.07016.34
5.4.110.0070.07716.45
5.4.100.0030.07316.41
5.4.90.0030.06016.37
5.4.80.0000.07016.40
5.4.70.0000.07016.54
5.4.60.0070.06016.45
5.4.50.0030.05716.43
5.4.40.0030.04316.54
5.4.30.0030.04016.38
5.4.20.0030.05716.42
5.4.10.0100.07016.23
5.4.00.0070.07315.95
5.3.270.0030.08014.59
5.3.260.0070.06014.61
5.3.250.0030.07014.62
5.3.240.0030.05314.53
5.3.230.0000.04714.76
5.3.220.0000.05014.48
5.3.210.0030.07314.48
5.3.200.0000.08014.64
5.3.190.0000.06014.64
5.3.180.0030.07014.47
5.3.170.0000.07314.58
5.3.160.0030.05014.54
5.3.150.0030.06314.79
5.3.140.0030.07014.56
5.3.130.0070.07714.57
5.3.120.0030.07014.54
5.3.110.0030.07314.63
5.3.100.0000.07314.16
5.3.90.0030.06314.00
5.3.80.0030.07014.00
5.3.70.0000.08014.18
5.3.60.0030.04313.93
5.3.50.0000.07713.95
5.3.40.0100.07013.96
5.3.30.0030.07314.03
5.3.20.0000.04713.60
5.3.10.0000.07713.56
5.3.00.0000.04713.65

preferences:
137.42 ms | 1394 KiB | 7 Q