3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar; public function setupBar() { $this->bar = function() { echo "inside bar!"; }; } public function callBar() { return $this->bar(); } } $f = new Foo(); $f->setupBar(); $f->callBar(); $f->bar();

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.0090.00918.43
8.3.50.0090.01121.99
8.3.40.0120.00318.79
8.3.30.0070.00719.02
8.3.20.0140.00320.38
8.3.10.0080.00023.65
8.3.00.0040.00419.38
8.2.180.0070.01418.14
8.2.170.0040.01122.96
8.2.160.0100.00320.35
8.2.150.0030.00524.18
8.2.140.0050.00224.66
8.2.130.0040.00426.16
8.2.120.0060.00617.63
8.2.110.0070.00422.13
8.2.100.0050.00517.93
8.2.90.0000.00919.23
8.2.80.0040.00417.97
8.2.70.0000.00917.61
8.2.60.0080.00017.93
8.2.50.0000.00818.07
8.2.40.0050.00319.36
8.2.30.0070.00020.64
8.2.20.0000.00717.80
8.2.10.0040.00418.07
8.2.00.0040.00417.94
8.1.280.0150.00325.92
8.1.270.0040.00423.79
8.1.260.0000.00726.35
8.1.250.0000.00728.09
8.1.240.0090.00022.54
8.1.230.0080.00317.66
8.1.220.0000.00817.76
8.1.210.0040.00418.77
8.1.200.0070.00317.11
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0050.00318.85
8.1.160.0040.00422.04
8.1.150.0000.00718.89
8.1.140.0000.00717.47
8.1.130.0000.00717.58
8.1.120.0000.00717.38
8.1.110.0040.00417.36
8.1.100.0040.00417.46
8.1.90.0070.00017.53
8.1.80.0000.01117.36
8.1.70.0050.00217.34
8.1.60.0040.00417.52
8.1.50.0080.00017.51
8.1.40.0040.00417.55
8.1.30.0030.00517.62
8.1.20.0070.00017.61
8.1.10.0000.00717.63
8.1.00.0000.00817.45
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0030.00318.50
8.0.270.0000.00716.81
8.0.260.0080.00017.26
8.0.250.0030.00316.97
8.0.240.0000.00716.88
8.0.230.0040.00416.96
8.0.220.0000.00716.86
8.0.210.0040.00416.86
8.0.200.0040.00416.88
8.0.190.0000.00816.93
8.0.180.0030.00517.00
8.0.170.0080.00016.93
8.0.160.0030.00617.04
8.0.150.0000.00816.89
8.0.140.0030.00416.84
8.0.130.0030.00313.42
8.0.120.0000.00816.81
8.0.110.0040.00416.99
8.0.100.0000.00816.93
8.0.90.0000.00816.77
8.0.80.0070.01416.96
8.0.70.0040.00417.07
8.0.60.0040.00416.80
8.0.50.0000.00716.75
8.0.30.0140.00417.05
8.0.20.0120.00717.40
8.0.10.0040.00417.07
8.0.00.0070.01016.83
7.4.330.0020.00215.08
7.4.320.0000.00616.61
7.4.300.0000.00716.56
7.4.290.0030.00316.50
7.4.280.0040.00416.54
7.4.270.0030.00316.59
7.4.260.0000.00816.39
7.4.250.0050.00316.61
7.4.240.0060.00116.51
7.4.230.0070.00016.40
7.4.220.0070.01116.57
7.4.210.0090.01016.61
7.4.200.0000.00716.69
7.4.160.0120.00416.45
7.4.150.0090.00917.40
7.4.140.0160.01017.86
7.4.130.0080.01216.49
7.4.120.0090.00816.56
7.4.110.0060.01216.37
7.4.100.0090.00916.50
7.4.90.0000.01716.49
7.4.80.0200.00319.39
7.4.70.0130.00316.54
7.4.60.0090.00916.56
7.4.50.0000.00816.54
7.4.40.0080.00816.43
7.4.30.0100.00616.35
7.4.00.0110.00714.95
7.3.330.0000.00613.32
7.3.320.0050.00013.29
7.3.310.0030.00316.26
7.3.300.0030.00316.41
7.3.290.0000.00816.24
7.3.280.0090.01016.36
7.3.270.0080.00917.40
7.3.260.0060.01116.32
7.3.250.0040.01316.43
7.3.240.0120.00516.46
7.3.230.0050.01116.39
7.3.210.0130.00316.51
7.3.200.0100.00716.41
7.3.190.0110.00516.28
7.3.180.0060.00916.34
7.3.170.0100.00616.44
7.3.160.0120.00316.55
7.3.120.0070.01014.73
7.3.110.0050.01314.79
7.3.100.0060.00914.75
7.3.90.0050.01014.68
7.3.80.0050.01014.88
7.3.70.0050.01214.89
7.3.60.0030.01014.71
7.3.50.0040.00814.84
7.3.40.0000.01014.69
7.3.30.0070.00914.66
7.3.20.0090.00516.57
7.3.10.0030.00916.67
7.3.00.0100.00516.77
7.2.330.0060.01216.50
7.2.320.0130.01016.70
7.2.310.0100.00716.41
7.2.300.0120.00616.66
7.2.290.0110.01116.72
7.2.250.0100.00814.93
7.2.240.0070.01214.87
7.2.230.0070.01015.18
7.2.220.0050.00614.93
7.2.210.0050.01215.10
7.2.200.0070.00414.95
7.2.190.0060.00914.90
7.2.180.0020.01115.01
7.2.170.0040.01315.03
7.2.60.0090.00317.05
7.2.00.0060.00619.57
7.1.330.0050.00815.76
7.1.320.0020.00815.60
7.1.310.0090.00315.72
7.1.300.0090.00515.66
7.1.290.0060.00515.69
7.1.280.0050.00515.66
7.1.270.0020.01115.68
7.1.260.0070.00915.60
7.1.200.0090.00315.68
7.1.100.0060.00618.02
7.1.70.0000.01017.18
7.1.60.0070.00719.43
7.1.50.0090.01216.83
7.1.00.0100.07022.37
7.0.200.0250.00414.45
7.0.60.0100.06021.80
7.0.50.0070.08017.72
7.0.40.0130.08020.13
7.0.30.0470.07320.19
7.0.20.0300.06020.06
7.0.10.0070.09020.23
7.0.00.0130.04320.09
5.6.280.0030.04321.11
5.6.210.0000.05020.76
5.6.200.0070.05318.21
5.6.190.0000.09320.39
5.6.180.0230.04720.48
5.6.170.0270.06720.46
5.6.160.0100.07720.39
5.6.150.0170.05018.13
5.6.140.0100.07718.14
5.6.130.0100.04018.17
5.6.120.0200.06721.03
5.6.110.0100.08321.13
5.6.100.0130.08020.99
5.6.90.0100.08021.11
5.6.80.0030.05320.54
5.5.350.3970.04020.41
5.5.340.0030.07317.99
5.5.330.0070.08720.23
5.5.320.0200.04020.51
5.5.310.0330.03720.23
5.5.300.0030.05318.05
5.5.290.0000.07718.01
5.5.280.0070.08720.77
5.5.270.0300.07020.90
5.5.260.0070.05320.80
5.5.250.0070.07720.77
5.5.240.0130.03320.24
5.4.450.0130.05719.29
5.4.440.0100.06319.05
5.4.430.0200.05019.55
5.4.420.0170.05319.46
5.4.410.0100.05719.13
5.4.400.0200.04719.28
5.4.390.0230.04318.98
5.4.380.0170.05319.18
5.4.370.0200.04718.99
5.4.360.0170.05719.14
5.4.350.0200.04719.18
5.4.340.0100.05719.28
5.4.320.0170.07018.96
5.4.310.0030.07718.92
5.4.300.0200.04719.22
5.4.290.0170.05018.99
5.4.280.0170.05318.95
5.4.270.0270.04319.28
5.4.260.0170.05719.14
5.4.250.0170.06718.95
5.4.240.0170.07318.99
5.4.230.0170.05018.84
5.4.220.0100.05718.75
5.4.210.0300.05318.96
5.4.200.0170.07018.76
5.4.190.0200.05018.94
5.4.180.0070.05719.18
5.4.170.0170.05018.75
5.4.160.0200.04719.18
5.4.150.0200.06018.96
5.4.140.0200.05316.39
5.4.130.0130.04716.33
5.4.120.0230.04016.36
5.4.110.0300.04716.63
5.4.100.0100.05316.46
5.4.90.0170.04316.33
5.4.80.0130.04716.61
5.4.70.0070.05716.44
5.4.60.0130.05016.45
5.4.50.0130.05016.57
5.4.40.0270.03716.43
5.4.30.0100.05316.55
5.4.20.0170.04716.39
5.4.10.0170.04716.42
5.4.00.0030.05715.90

preferences:
86.19 ms | 401 KiB | 5 Q