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 () { $this->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.0160.00318.52
8.3.50.0140.00317.94
8.3.40.0080.00818.92
8.3.30.0040.01118.47
8.3.20.0070.00020.26
8.3.10.0000.00723.65
8.3.00.0060.00319.59
8.2.180.0090.00918.54
8.2.170.0040.01122.96
8.2.160.0070.01018.92
8.2.150.0030.00524.18
8.2.140.0080.00024.66
8.2.130.0080.00019.27
8.2.120.0080.00026.35
8.2.110.0030.00620.38
8.2.100.0060.00619.71
8.2.90.0000.00817.74
8.2.80.0000.00920.41
8.2.70.0080.00017.93
8.2.60.0060.00317.80
8.2.50.0030.00518.10
8.2.40.0080.00021.98
8.2.30.0090.00019.24
8.2.20.0070.00017.97
8.2.10.0000.00718.06
8.2.00.0030.00318.12
8.1.280.0120.00625.92
8.1.270.0030.00520.33
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0000.00824.02
8.1.230.0060.00621.05
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0040.00417.23
8.1.190.0090.00018.87
8.1.180.0080.00018.10
8.1.170.0040.00418.94
8.1.160.0000.00818.87
8.1.150.0000.00720.15
8.1.140.0000.00817.64
8.1.130.0070.00018.87
8.1.120.0000.00817.32
8.1.110.0040.00417.34
8.1.100.0000.00717.30
8.1.90.0000.00717.41
8.1.80.0030.00617.42
8.1.70.0000.00717.36
8.1.60.0030.00617.52
8.1.50.0000.00817.45
8.1.40.0090.00017.34
8.1.30.0060.00617.59
8.1.20.0040.00417.51
8.1.10.0040.00417.51
8.1.00.0040.00417.49
8.0.300.0040.00420.16
8.0.290.0030.00516.75
8.0.280.0040.00418.29
8.0.270.0040.00417.27
8.0.260.0000.00716.74
8.0.250.0100.00016.91
8.0.240.0040.00416.91
8.0.230.0070.00016.84
8.0.220.0040.00416.95
8.0.210.0070.00016.87
8.0.200.0000.00817.04
8.0.190.0040.00416.98
8.0.180.0070.00017.01
8.0.170.0030.00516.97
8.0.160.0000.00716.97
8.0.150.0030.00516.88
8.0.140.0000.00816.87
8.0.130.0050.00013.37
8.0.120.0000.00816.84
8.0.110.0050.00217.02
8.0.100.0040.00416.81
8.0.90.0040.00416.78
8.0.80.0040.01616.98
8.0.70.0050.00216.98
8.0.60.0040.00416.98
8.0.50.0040.00416.98
8.0.30.0080.01317.12
8.0.20.0100.00817.40
8.0.10.0040.00416.97
8.0.00.0090.00916.69
7.4.330.0000.00715.55
7.4.320.0030.00316.44
7.4.300.0060.00016.51
7.4.290.0030.00316.52
7.4.280.0000.00716.57
7.4.270.0000.00716.51
7.4.260.0000.00716.55
7.4.250.0070.00016.49
7.4.240.0040.00416.49
7.4.230.0030.00316.54
7.4.220.0040.00416.42
7.4.210.0080.00816.50
7.4.200.0000.00716.28
7.4.160.0090.00616.46
7.4.150.0110.00617.40
7.4.140.0120.00717.86
7.4.130.0030.01416.39
7.4.120.0110.00716.47
7.4.110.0100.00716.34
7.4.100.0090.01116.56
7.4.90.0100.00716.56
7.4.80.0070.01019.39
7.4.70.0100.01016.43
7.4.60.0070.01016.50
7.4.50.0070.01116.32
7.4.40.0060.00916.46
7.4.00.0070.01115.05
7.3.330.0000.00513.13
7.3.320.0000.00513.29
7.3.310.0030.00516.29
7.3.300.0040.00416.24
7.3.290.0000.00716.30
7.3.280.0090.01816.27
7.3.270.0100.00717.40
7.3.260.0090.00816.44
7.3.250.0100.00716.34
7.3.240.0090.00716.43
7.3.230.0130.00316.30
7.3.210.0080.00816.44
7.3.200.0120.00616.42
7.3.190.0150.00416.44
7.3.180.0030.01316.48
7.3.170.0120.00916.50
7.3.160.0100.00716.31
7.3.120.0030.00617.15
7.3.110.0030.01017.15
7.3.100.0060.00617.15
7.3.90.0070.00717.15
7.3.80.0060.00917.15
7.3.70.0100.00317.15
7.3.60.0030.00717.15
7.3.50.0030.00717.15
7.3.40.0060.00917.15
7.3.30.0070.00717.15
7.3.20.0080.00417.15
7.3.10.0090.00617.15
7.3.00.0160.00017.15
7.2.330.0030.01316.59
7.2.320.0090.00816.63
7.2.310.0030.01316.63
7.2.300.0090.01216.64
7.2.290.0080.00816.33
7.2.240.0070.00717.15
7.2.230.0030.01017.15
7.2.220.0090.00617.15
7.2.210.0090.00617.15
7.2.200.0070.00717.15
7.2.190.0100.00717.15
7.2.180.0070.00717.15
7.2.170.0030.01517.15
7.2.160.0100.00717.15
7.2.150.0030.01317.15
7.2.140.0040.01117.15
7.2.130.0090.00317.15
7.2.120.0000.01517.15
7.2.110.0170.00616.77
7.2.100.0000.01517.15
7.2.90.0060.00617.15
7.2.80.0070.01117.15
7.2.70.0080.00817.15
7.2.60.0020.01116.99
7.2.50.0070.01017.15
7.2.40.0140.00317.15
7.2.30.0100.00717.15
7.2.20.0150.01017.50
7.2.10.0360.01417.56
7.2.00.0110.01017.38
7.1.330.0030.01017.15
7.1.320.0030.01317.15
7.1.310.0030.00617.15
7.1.300.0100.00317.15
7.1.290.0030.00717.15
7.1.280.0070.00417.15
7.1.270.0100.00717.15
7.1.260.0040.01117.15
7.1.250.0090.00617.15
7.1.200.0100.00315.63
7.1.140.0220.00616.80
7.1.130.0180.00916.99
7.1.120.0230.01016.93
7.1.110.0200.01316.09
7.1.100.0220.00415.93
7.1.90.0220.00916.21
7.1.80.0170.01016.16
7.1.70.0240.00315.09
7.1.60.0260.01733.08
7.1.50.0480.01732.76
7.1.40.0320.02232.63
7.1.30.0470.00332.70
7.1.20.0340.01032.80
7.1.10.0220.01114.38
7.1.00.0250.01614.63

preferences:
62.8 ms | 400 KiB | 5 Q