3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar { private $a; public function __construct($a) { $this->a = (bool) $a; } public function a() { return $this->a; } } function foo(callable $x) { $object = new Bar(false); $x($object); return $object->a(); } var_dump(\Closure::bind(function () use ($bar) { $bar->a = true;} , 'Bar', '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.0190.00018.16
8.3.50.0100.01018.31
8.3.40.0110.00418.74
8.3.30.0070.00718.70
8.3.20.0080.00020.34
8.3.10.0040.00423.48
8.3.00.0030.00619.67
8.2.180.0180.00418.09
8.2.170.0040.01222.96
8.2.160.0070.01019.08
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00020.95
8.2.110.0000.00920.66
8.2.100.0040.00719.63
8.2.90.0040.00417.91
8.2.80.0000.00820.28
8.2.70.0060.00317.80
8.2.60.0040.00417.93
8.2.50.0000.00918.10
8.2.40.0040.00422.28
8.2.30.0090.00019.31
8.2.20.0000.00717.99
8.2.10.0000.00718.05
8.2.00.0030.00318.15
8.1.280.0110.00725.92
8.1.270.0090.00020.23
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.00023.84
8.1.230.0070.00320.90
8.1.220.0050.00317.79
8.1.210.0090.00018.77
8.1.200.0000.00817.12
8.1.190.0060.00319.06
8.1.180.0000.00718.10
8.1.170.0060.00318.92
8.1.160.0000.00718.77
8.1.150.0020.00520.18
8.1.140.0040.00417.64
8.1.130.0070.00018.87
8.1.120.0000.00717.43
8.1.110.0000.00717.30
8.1.100.0080.00017.38
8.1.90.0000.00717.42
8.1.80.0000.00817.35
8.1.70.0030.00317.42
8.1.60.0060.00317.56
8.1.50.0030.00517.38
8.1.40.0050.00317.35
8.1.30.0080.00317.57
8.1.20.0030.00617.54
8.1.10.0000.00717.38
8.1.00.0000.00817.41
8.0.300.0040.00420.08
8.0.290.0080.00016.63
8.0.280.0030.00318.37
8.0.270.0060.00317.20
8.0.260.0000.00716.72
8.0.250.0030.00617.00
8.0.240.0000.00716.86
8.0.230.0000.00717.01
8.0.220.0000.00716.87
8.0.210.0040.00416.85
8.0.200.0040.00416.91
8.0.190.0040.00416.89
8.0.180.0040.00416.96
8.0.170.0060.00316.94
8.0.160.0050.00316.93
8.0.150.0080.00016.91
8.0.140.0030.00516.90
8.0.130.0030.00313.39
8.0.120.0070.00016.81
8.0.110.0050.00316.84
8.0.100.0020.00516.84
8.0.90.0060.00316.95
8.0.80.0120.00616.88
8.0.70.0050.00216.76
8.0.60.0080.00016.77
8.0.50.0020.00516.84
8.0.30.0130.00717.00
8.0.20.0080.01017.40
8.0.10.0040.00417.05
8.0.00.0120.01016.68
7.4.330.0000.00616.66
7.4.320.0000.00616.48
7.4.300.0060.00016.38
7.4.290.0050.00216.36
7.4.280.0030.00616.36
7.4.270.0000.00716.43
7.4.260.0030.00416.54
7.4.250.0000.00716.41
7.4.240.0030.00316.35
7.4.230.0030.00316.34
7.4.220.0070.00016.53
7.4.210.0050.01116.46
7.4.200.0040.00416.54
7.4.160.0110.00516.52
7.4.150.0120.00617.40
7.4.140.0110.00817.86
7.4.130.0150.00716.37
7.4.120.0030.01416.46
7.4.110.0070.01116.68
7.4.100.0080.00816.50
7.4.90.0070.01016.37
7.4.80.0110.00919.39
7.4.70.0140.00616.25
7.4.60.0030.01316.64
7.4.50.0110.00716.29
7.4.40.0090.00916.51
7.4.10.0070.01014.82
7.4.00.0050.01314.85
7.3.330.0050.00013.36
7.3.320.0000.00513.19
7.3.310.0070.00016.29
7.3.300.0030.00316.36
7.3.290.0000.00716.22
7.3.280.0070.01116.36
7.3.270.0140.00317.40
7.3.260.0110.00616.41
7.3.250.0050.01216.41
7.3.240.0110.00816.39
7.3.230.0120.00416.44
7.3.210.0120.00316.34
7.3.200.0060.01016.46
7.3.190.0060.01216.63
7.3.180.0100.00616.29
7.3.170.0150.00416.36
7.3.160.0080.00816.43
7.3.130.0070.01114.82
7.3.120.0060.01214.89
7.3.110.0060.00914.74
7.3.100.0090.00615.00
7.3.90.0120.00314.63
7.3.80.0050.00514.55
7.3.70.0030.01314.70
7.3.60.0090.00614.47
7.3.50.0030.01414.57
7.3.40.0120.00014.84
7.3.30.0040.00414.42
7.3.20.0070.00716.65
7.3.10.0070.00316.57
7.3.00.0030.01416.59
7.2.330.0140.00416.40
7.2.320.0100.00716.27
7.2.310.0140.00716.43
7.2.300.0110.00616.18
7.2.290.0090.00616.61
7.2.260.0110.00714.85
7.2.250.0030.01414.76
7.2.240.0070.00714.66
7.2.230.0060.00615.02
7.2.220.0060.00815.05
7.2.210.0070.00414.97
7.2.200.0090.00314.92
7.2.190.0060.00614.59
7.2.180.0090.00614.68
7.2.170.0060.00615.00
7.2.160.0110.00014.43
7.2.150.0120.00316.89
7.2.140.0060.00816.55
7.2.130.0000.01916.60
7.2.120.0040.01516.80
7.2.110.0060.00316.79
7.2.100.0090.00616.53
7.2.90.0070.00716.74
7.2.80.0040.01216.57
7.2.70.0110.00416.70
7.2.60.0020.01016.59
7.2.50.0060.00916.82
7.2.40.0060.00616.84
7.2.30.0070.01016.91
7.2.20.0170.01017.28
7.2.10.0110.01817.05
7.2.00.0160.01017.31
7.1.330.0040.01115.82
7.1.320.0030.01015.68
7.1.310.0030.01015.76
7.1.300.0000.00815.63
7.1.290.0090.00315.56
7.1.280.0040.01015.79
7.1.270.0060.00315.69
7.1.260.0090.00315.70
7.1.250.0150.00315.40
7.1.240.0080.00815.71
7.1.230.0050.00515.68
7.1.220.0000.01015.73
7.1.210.0040.00715.71
7.1.200.0000.01415.70
7.1.190.0070.00415.48
7.1.180.0000.01315.37
7.1.170.0090.00615.48
7.1.160.0000.01415.84
7.1.150.0100.01015.64
7.1.140.0150.00916.20
7.1.130.0090.01516.14
7.1.120.0140.00816.20
7.1.110.0160.00915.84
7.1.100.0150.00815.68
7.1.90.0160.00315.79
7.1.80.0160.00915.93
7.1.70.0150.00815.47
7.1.60.0210.01124.55
7.1.50.0190.01224.17
7.1.40.0200.00924.16
7.1.30.0190.01324.11
7.1.20.0190.01224.13
7.1.10.0110.01115.07
7.1.00.0090.01414.95
7.0.330.0080.00415.21
7.0.320.0100.00615.18
7.0.310.0000.01415.20
7.0.300.0030.01015.27
7.0.290.0040.01215.27
7.0.280.0050.00815.22
7.0.270.0030.01015.20
7.0.260.0000.01315.24
7.0.250.0070.00715.37
7.0.240.0070.00715.23
7.0.230.0070.00715.23
7.0.220.0040.00415.15
7.0.210.0040.00815.07
7.0.200.0070.00715.36
7.0.190.0070.00315.32
7.0.180.0070.00715.10
7.0.170.0090.00615.35
7.0.160.0000.01415.36
7.0.150.0000.01415.35
7.0.140.0070.01015.24
7.0.130.0000.01515.21
7.0.120.0040.00715.16
7.0.110.0040.00715.14
7.0.100.0060.00915.36
7.0.90.0000.01315.36
7.0.80.0030.00615.18
7.0.70.0000.00815.03
7.0.60.0000.01015.07
7.0.50.0120.00015.37
7.0.40.0110.00413.10
7.0.30.0030.01013.12
7.0.20.0050.00513.41
7.0.10.0080.00413.46
7.0.00.0040.00413.33
5.6.400.0030.00614.42
5.6.390.0030.01514.12
5.6.380.0030.01313.86
5.6.370.0030.00913.68
5.6.360.0110.00414.13
5.6.350.0030.01014.35
5.6.340.0040.01514.22
5.6.330.0030.01014.22
5.6.320.0040.00813.79
5.6.310.0100.00314.10
5.6.300.0070.01014.34
5.6.290.0120.00414.33
5.6.280.0110.00714.09
5.6.270.0030.00614.41
5.6.260.0070.00714.23
5.6.250.0000.01714.15
5.6.240.0040.01114.12
5.6.230.0090.00414.40
5.6.220.0030.01014.04
5.6.210.0040.00814.01
5.6.200.0000.01114.23
5.6.190.0090.00614.04
5.6.180.0120.00414.02
5.6.170.0030.01314.21
5.6.160.0080.00014.28
5.6.150.0040.00414.06
5.6.140.0030.00914.22
5.6.130.0110.00314.20
5.6.120.0070.00414.04
5.6.110.0030.00914.16
5.6.100.0140.00014.19
5.6.90.0040.00714.04
5.6.80.0090.00314.09
5.6.70.0000.00913.70
5.6.60.0030.00814.17
5.6.50.0080.00814.04
5.6.40.0000.00814.02
5.6.30.0070.00713.80
5.6.20.0040.00814.00
5.6.10.0070.00713.96
5.6.00.0000.00814.30

preferences:
70.13 ms | 400 KiB | 5 Q