3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $foo = 1; private $bar = 2; public function toArray() { $publics_only = function() use ($i) { return get_object_vars($i); }; return $publics_only(); } } $foo = new Foo(); var_dump($foo->toArray());

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.3.60.0060.01218.55
8.3.50.0120.00617.99
8.3.40.0140.00418.88
8.3.30.0120.00318.69
8.3.20.0040.00421.94
8.3.10.0060.00323.48
8.3.00.0000.00817.93
8.2.180.0110.00816.88
8.2.170.0140.00022.96
8.2.160.0100.00722.13
8.2.150.0070.00024.18
8.2.140.0070.00024.66
8.2.130.0000.00821.07
8.2.120.0040.00426.35
8.2.110.0030.00620.25
8.2.100.0110.00319.38
8.2.90.0050.00317.90
8.2.80.0040.00419.21
8.2.70.0040.00417.90
8.2.60.0000.00818.05
8.2.50.0040.00418.10
8.2.40.0090.00020.43
8.2.30.0000.00719.31
8.2.20.0000.01118.14
8.2.10.0030.00518.13
8.2.00.0080.00018.06
8.1.280.0070.00725.92
8.1.270.0000.00723.96
8.1.260.0080.00026.35
8.1.250.0000.01028.09
8.1.240.0000.00822.06
8.1.230.0040.00824.09
8.1.220.0000.00817.76
8.1.210.0080.00018.77
8.1.200.0000.00817.35
8.1.190.0000.00917.48
8.1.180.0000.00918.10
8.1.170.0090.00018.58
8.1.160.0050.00318.89
8.1.150.0030.00520.73
8.1.140.0030.00517.63
8.1.130.0070.00019.03
8.1.120.0040.00417.50
8.1.110.0040.00417.46
8.1.100.0000.00717.49
8.1.90.0000.00717.36
8.1.80.0030.00717.46
8.1.70.0090.00017.44
8.1.60.0030.00517.59
8.1.50.0000.00817.46
8.1.40.0060.00317.45
8.1.30.0000.00817.60
8.1.20.0050.00317.62
8.1.10.0040.00417.52
8.1.00.0050.00317.41
8.0.300.0070.00020.27
8.0.290.0000.00716.88
8.0.280.0040.00418.44
8.0.270.0030.00317.29
8.0.260.0000.00817.25
8.0.250.0070.00016.99
8.0.240.0000.00717.02
8.0.230.0070.00016.94
8.0.220.0000.00716.93
8.0.210.0070.00016.90
8.0.200.0040.00417.06
8.0.190.0000.00816.92
8.0.180.0000.00716.88
8.0.170.0030.00716.91
8.0.160.0080.00016.92
8.0.150.0070.00016.94
8.0.140.0040.00316.84
8.0.130.0030.00313.45
8.0.120.0050.00316.96
8.0.110.0040.00416.81
8.0.100.0040.00416.90
8.0.90.0040.00416.88
8.0.80.0030.01216.92
8.0.70.0000.00716.92
8.0.60.0030.00316.80
8.0.50.0080.00017.08
8.0.30.0080.01117.15
8.0.20.0100.01117.40
8.0.10.0040.00417.04
8.0.00.0090.00916.65
7.4.330.0020.00215.55
7.4.320.0000.00716.50
7.4.300.0070.00016.48
7.4.290.0000.00716.63
7.4.280.0070.00016.51
7.4.270.0070.00016.49
7.4.260.0030.00316.58
7.4.250.0000.01016.63
7.4.240.0000.00716.64
7.4.230.0000.00716.70
7.4.220.0000.00816.68
7.4.210.0100.00316.65
7.4.200.0030.00316.68
7.4.160.0130.00316.47
7.4.140.0110.00817.86
7.4.130.0180.00616.52
7.4.120.0120.00916.52
7.4.110.0090.00816.44
7.4.100.0170.00016.65
7.4.90.0060.01016.51
7.4.80.0150.00419.39
7.4.70.0030.02016.48
7.4.60.0100.00716.24
7.4.50.0070.01016.65
7.4.40.0110.01116.57
7.4.00.0080.00814.92
7.3.330.0050.00013.22
7.3.320.0000.00613.37
7.3.310.0030.00316.38
7.3.300.0070.00016.42
7.3.290.0000.00816.40
7.3.280.0090.01116.34
7.3.260.0140.00616.41
7.3.240.0110.00716.47
7.3.230.0000.01616.52
7.3.210.0030.01316.52
7.3.200.0030.01616.59
7.3.190.0030.01316.23
7.3.180.0070.01016.35
7.3.170.0090.00816.42
7.3.160.0120.00316.52
7.3.120.0040.01314.84
7.3.110.0070.00714.90
7.3.100.0100.00514.74
7.3.90.0050.01214.83
7.3.80.0090.00514.79
7.3.70.0070.00914.93
7.3.60.0050.00714.92
7.3.50.0070.00714.67
7.3.40.0060.00614.73
7.3.30.0050.00514.63
7.3.20.0090.00416.74
7.3.10.0060.00616.67
7.3.00.0060.00816.60
7.2.330.0050.01816.72
7.2.320.0120.00416.77
7.2.310.0120.00616.73
7.2.300.0060.01116.44
7.2.290.0110.00616.73
7.2.250.0060.00914.66
7.2.240.0070.01115.00
7.2.230.0070.00815.02
7.2.220.0050.01115.03
7.2.210.0090.00714.86
7.2.200.0100.00714.96
7.2.190.0070.00814.85
7.2.180.0030.01114.94
7.2.170.0100.00615.01
7.2.160.0090.00615.11
7.2.150.0050.00516.78
7.2.140.0030.01416.73
7.2.130.0060.00616.82
7.2.120.0090.00616.94
7.2.110.0030.00916.95
7.2.100.0060.00916.94
7.2.90.0100.00317.06
7.2.80.0070.01116.65
7.2.70.0030.01317.09
7.2.60.0060.00716.85
7.2.50.0040.00616.83
7.2.40.2000.01117.48
7.2.30.0120.00517.51
7.2.20.0130.00817.47
7.2.10.0090.01117.38
7.2.00.0070.01217.32
7.1.330.0070.00515.60
7.1.320.0020.01015.67
7.1.310.0060.00915.81
7.1.300.0080.00715.82
7.1.290.0050.01015.74
7.1.280.0060.00815.90
7.1.270.0060.00815.64
7.1.260.0060.00815.86
7.1.250.0060.01015.70
7.1.200.0110.00015.98
7.1.160.4060.01316.85
7.1.150.3770.01316.81
7.1.140.0690.01316.61
7.1.130.0290.01316.48
7.1.120.0110.01216.43
7.1.110.0130.01315.71
7.1.100.4870.01315.86
7.1.90.7180.00916.23
7.1.80.6580.00815.91
7.1.70.4550.01215.42
7.1.60.0970.01133.34
7.1.50.4570.01632.83
7.1.40.0580.01532.62
7.1.30.6470.01332.81
7.1.20.8790.02032.49
7.1.10.8150.01014.77
7.1.00.5570.00914.74

preferences:
53.44 ms | 400 KiB | 5 Q