3v4l.org

run code in 500+ PHP versions simultaneously
<?php class X { private $p = 1; public $q = 2; } $x = new x; $y = (array) $x; print_r($y); /* Array ( [Xp] => 1 [q] => 2 ) */ $f = function() {}; print get_class($f); /// Closure var_dump((array) $f); /* Closure array(1) { [0]=> object(Closure)#2 (0) { } } */ ?>

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.70.0100.01016.80
8.5.60.0070.00816.74
8.5.50.0060.00218.28
8.5.30.0100.00818.20
8.5.20.0100.00720.05
8.5.10.0110.01016.59
8.5.00.0130.01019.88
8.4.210.0110.01419.46
8.4.180.0180.00519.57
8.4.170.0130.00823.93
8.4.160.0090.01223.90
8.4.150.0100.00517.80
8.4.140.0140.00617.29
8.4.130.0070.00417.73
8.4.120.0100.00723.86
8.4.110.0110.00922.29
8.4.100.0130.00817.64
8.4.90.0100.01217.55
8.4.80.0120.00519.16
8.4.70.0260.01019.19
8.4.60.0150.00519.25
8.4.50.0140.00519.43
8.4.40.0190.00617.57
8.4.30.0210.00519.21
8.4.20.0180.00317.32
8.4.10.0200.00217.57
8.3.300.0130.00720.85
8.3.290.0090.01220.82
8.3.280.0120.00918.32
8.3.270.0140.00816.70
8.3.260.0110.00816.34
8.3.250.0130.00616.73
8.3.240.0030.00517.15
8.3.230.0100.00916.68
8.3.220.0130.00616.98
8.3.210.0030.00516.59
8.3.200.0130.00717.99
8.3.190.0160.00416.39
8.3.180.0190.00218.54
8.3.170.0180.00516.61
8.3.160.0160.00616.45
8.3.150.0160.00516.52
8.3.140.0140.00916.26
8.3.130.0150.00516.74
8.3.120.0150.00416.21
8.3.110.0150.00416.42
8.3.100.0180.00316.52
8.3.90.0180.00216.59
8.3.80.0180.00316.43
8.3.70.0160.00416.33
8.3.60.0180.00316.25
8.3.50.0170.00418.54
8.3.40.0170.00217.26
8.3.30.0150.00417.33
8.3.20.0140.00617.29
8.3.10.0150.00319.00
8.3.00.0140.00516.96
8.2.300.0100.01118.75
8.2.290.0100.01020.31
8.2.280.0120.00516.60
8.2.270.0130.00616.41
8.2.260.0130.00516.53
8.2.250.0110.00716.26
8.2.240.0120.00616.65
8.2.230.0160.00316.27
8.2.220.0160.00316.30
8.2.210.0160.00318.24
8.2.200.0160.00216.29
8.2.190.0120.00716.62
8.2.180.0130.00517.78
8.2.170.0160.00317.66
8.2.160.0150.00417.61
8.2.150.0160.00317.43
8.2.140.0140.00717.16
8.2.130.0170.00217.53
8.2.120.0190.00017.35
8.2.110.0150.00417.35
8.2.100.0150.00419.28
8.2.90.0130.00617.74
8.2.80.0150.00617.41
8.2.70.0140.00517.34
8.2.60.0140.00517.30
8.2.50.0170.00517.38
8.2.40.0170.00217.29
8.2.30.0260.01017.16
8.2.20.0230.00417.09
8.2.10.0190.00517.54
8.2.00.0180.00617.26
8.1.340.0090.01121.58

preferences:
32.69 ms | 860 KiB | 5 Q