3v4l.org

run code in 500+ PHP versions simultaneously
<?php class X { static public $p = 1; static function foo() {} function __toString() : string { return 'foo'; } } $name = []; // try with different type : bool, int, float, object.. try { echo X::$name; } catch (Error $e) { print $e->getMessage(); } $name = []; try { echo X::${$name}(); } catch (Error $e) { print $e->getMessage(); } ?>

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)
8.5.60.0080.00916.89
8.5.50.0130.00517.02
8.5.30.0090.00918.01
8.5.20.0090.00819.93
8.5.10.0130.00516.70
8.5.00.0130.01019.83
8.4.210.0130.00421.50
8.4.180.0110.01119.68
8.4.170.0170.00520.43
8.4.160.0160.00520.65
8.4.150.0080.00416.84
8.4.140.0130.00917.84
8.4.130.0070.00318.70
8.4.120.0050.00424.13
8.4.110.0130.00818.73
8.4.100.0140.00718.75
8.4.90.0140.00720.36
8.4.80.0100.01018.88
8.4.70.0100.00818.91
8.4.60.0140.00618.63
8.4.50.0080.00118.84
8.4.40.0070.01117.90
8.4.30.0030.00620.18
8.4.20.0130.00619.59
8.4.10.0210.00017.58
8.3.300.0120.00920.80
8.3.290.0160.00620.80
8.3.280.0120.00818.50
8.3.270.0130.00616.54
8.3.260.0120.00816.63
8.3.250.0120.00318.46
8.3.240.0080.00916.94
8.3.230.0120.00716.36
8.3.220.0090.00918.64
8.3.210.0100.00416.64
8.3.200.0040.00516.55
8.3.190.0090.00916.98
8.3.180.0090.00819.05
8.3.170.0110.00717.20
8.3.160.0150.00818.22
8.3.150.0180.00316.55
8.3.140.0170.00416.78
8.3.130.0130.00318.41
8.3.120.0130.00518.59
8.3.110.0170.00018.27
8.3.100.0170.00418.52
8.3.90.0120.00916.34
8.3.80.0180.00416.54
8.3.70.0150.00618.20
8.3.60.0190.00316.90
8.3.50.0170.00316.51
8.3.40.0150.00317.43
8.3.30.0110.00717.39
8.3.20.0130.00617.37
8.3.10.0110.00717.36
8.3.00.0030.00817.52
8.2.300.0080.01120.42
8.2.290.0100.00820.26
8.2.280.0060.00218.42
8.2.270.0140.00316.63
8.2.260.0150.00316.76
8.2.250.0130.00616.77
8.2.240.0140.00516.58
8.2.230.0130.00516.39
8.2.220.0160.00416.67
8.2.210.0140.00616.43
8.2.200.0160.00318.09
8.2.190.0160.00316.70
8.2.180.0150.00316.63
8.2.170.0160.00517.70
8.2.160.0120.00819.55
8.2.150.0140.00317.49
8.2.140.0160.00417.67
8.2.130.0160.00317.43
8.2.120.0190.00017.42
8.2.110.0170.00217.63
8.2.100.0130.00617.32
8.2.90.0140.00619.45
8.2.80.0170.00017.57
8.2.70.0160.00817.38
8.2.60.0140.00417.40
8.2.50.0190.00017.49
8.2.40.0180.00017.46
8.2.30.0120.00617.36
8.2.20.0140.00317.31
8.2.10.0150.00317.41
8.2.00.0100.00717.69
8.1.340.0100.01020.24
8.1.320.0110.00716.26

preferences:
62.02 ms | 865 KiB | 5 Q