3v4l.org

run code in 300+ PHP versions simultaneously
<?php class IsolatedTest { protected $closure; public function __construct($closure) { $this->closure = $closure; } public function __invoke() { call_user_func($this->closure); } } class Test { public function testing(callable $what) { return Closure::bind($what, $this, $this); } } $test = new IsolatedTest(function () { echo 'This can be forked and called.'; }); $more = (new Test)->testing($test); var_dump($more);

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.0080.00616.88
8.3.50.0090.00618.28
8.3.40.0070.01018.59
8.3.30.0070.00719.03
8.3.20.0040.00420.29
8.3.10.0040.00421.77
8.3.00.0000.00819.50
8.2.180.0110.00416.63
8.2.170.0140.00022.96
8.2.160.0100.00720.38
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0030.00619.48
8.2.110.0040.00719.21
8.2.100.0030.00917.84
8.2.90.0040.00419.21
8.2.80.0060.00317.97
8.2.70.0040.00417.75
8.2.60.0030.00519.55
8.2.50.0050.00318.07
8.2.40.0030.00518.09
8.2.30.0040.00418.13
8.2.20.0040.00417.63
8.2.10.0040.00418.11
8.2.00.0000.00817.81
8.1.280.0140.00425.92
8.1.270.0040.00418.88
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00319.21
8.1.230.0030.00721.04
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0070.00317.34
8.1.190.0030.00517.23
8.1.180.0050.00318.10
8.1.170.0040.00420.29
8.1.160.0000.00722.00
8.1.150.0000.00718.81
8.1.140.0000.00917.47
8.1.130.0030.00317.83
8.1.120.0000.00717.53
8.1.110.0030.00317.49
8.1.100.0040.00417.42
8.1.90.0040.00417.42
8.1.80.0070.00017.48
8.1.70.0000.00717.46
8.1.60.0030.00617.62
8.1.50.0000.00717.62
8.1.40.0030.00617.50
8.1.30.0000.00817.58
8.1.20.0030.00617.56
8.1.10.0040.00417.54
8.1.00.0060.00317.36
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0000.00718.40
8.0.270.0000.00717.15
8.0.260.0030.00317.08
8.0.250.0070.00016.97
8.0.240.0000.00716.96
8.0.230.0040.00416.87
8.0.220.0030.00316.86
8.0.210.0030.00316.88
8.0.200.0030.00316.91
8.0.190.0040.00417.03
8.0.180.0040.00417.01
8.0.170.0090.00016.97
8.0.160.0000.00817.04
8.0.150.0030.00316.99
8.0.140.0000.00716.83
8.0.130.0090.00013.36
8.0.120.0000.00816.79
8.0.110.0000.00817.01
8.0.100.0040.00416.95
8.0.90.0040.00417.02
8.0.80.0060.00917.00
8.0.70.0000.00716.87
8.0.60.0030.00516.99
8.0.50.0040.00416.84
8.0.30.0110.01317.09
8.0.20.0160.00517.40
8.0.10.0080.00016.96
8.0.00.0110.00916.61
7.4.330.0030.00315.03
7.4.320.0060.00016.52
7.4.300.0000.00616.42
7.4.290.0030.00316.57
7.4.280.0060.00316.41
7.4.270.0000.00716.58
7.4.260.0000.00716.58
7.4.250.0070.00016.56
7.4.240.0030.00516.41
7.4.230.0000.00716.55
7.4.220.0110.00716.61
7.4.210.0080.00716.59
7.4.200.0000.00716.60
7.4.160.0120.00916.44
7.4.150.0080.01117.40
7.4.140.0080.01017.86
7.4.130.0100.00816.58
7.4.120.0040.01516.45
7.4.110.0110.01216.58
7.4.100.0160.00316.62
7.4.90.0100.00716.50
7.4.80.0060.01419.39
7.4.70.0120.00616.27
7.4.60.0130.00316.48
7.4.50.0000.00816.48
7.4.40.0120.00316.72
7.4.30.0100.01316.64
7.4.00.0090.00614.86
7.3.330.0020.00213.30
7.3.320.0060.00613.45
7.3.310.0040.00416.48
7.3.300.0040.00416.42
7.3.290.0040.00416.38
7.3.280.0030.01116.34
7.3.270.0100.00717.40
7.3.260.0090.01216.34
7.3.250.0130.00616.50
7.3.240.0100.00716.49
7.3.230.0150.00916.47
7.3.210.0140.00316.30
7.3.200.0060.01119.39
7.3.190.0060.01116.48
7.3.180.0050.01016.30
7.3.170.0090.00916.50
7.3.160.0100.01016.45
7.3.10.0030.01316.69
7.3.00.0120.00316.39
7.2.330.0160.00516.86
7.2.320.0090.01216.43
7.2.310.0070.01016.22
7.2.300.0070.01516.34
7.2.290.0060.01216.74
7.2.130.0070.00716.64
7.2.120.0130.00016.81
7.2.110.0070.00316.93
7.2.100.0030.00916.89
7.2.90.0070.00717.04
7.2.80.0060.00916.77
7.2.70.0040.00816.88
7.2.60.0060.00616.81
7.2.50.0090.00616.88
7.2.40.0050.00516.95
7.2.30.0120.00016.92
7.2.20.0070.00416.79
7.2.10.0070.00316.73
7.2.00.0040.00918.15
7.1.250.0140.00015.69
7.1.200.0070.00415.87
7.1.100.0030.01218.07
7.1.70.0040.00417.16
7.1.60.0040.00817.22
7.1.50.0030.02016.99
7.1.00.0030.07722.43
7.0.200.0040.00416.60
7.0.140.0030.06721.94
7.0.60.0070.04019.98
7.0.50.0030.06317.79
7.0.40.0130.03320.23
7.0.30.0530.07020.32
7.0.20.0370.07720.15
7.0.10.0300.06320.20
7.0.00.0030.04320.22
5.6.280.0070.07020.98
5.6.210.0030.05720.52
5.6.200.0000.04718.15
5.6.190.0070.06720.62
5.6.180.0300.06020.56
5.6.170.0270.05720.47
5.6.160.0070.08720.50
5.6.150.0100.04318.18
5.6.140.0070.07718.16
5.6.130.0100.07718.18
5.6.120.0000.08721.04
5.6.110.0070.04021.10
5.6.100.0100.06321.05
5.6.90.0030.09021.01
5.6.80.0070.03720.39
5.6.70.0000.08320.29
5.5.350.0230.03320.33
5.5.340.0100.08018.08
5.5.330.0000.04720.27
5.5.320.0070.08720.31
5.5.310.0370.05720.36
5.5.300.0100.03318.08
5.5.290.0100.07018.02
5.5.280.0070.05720.78
5.5.270.0030.04320.87
5.5.260.0070.08320.87
5.5.250.0200.06720.50
5.5.240.0100.03320.08
5.4.450.0430.05019.39
5.4.440.1030.06319.35
5.4.430.0970.07019.55
5.4.420.0870.05019.38
5.4.410.0100.05318.94
5.4.400.0400.05018.79
5.4.390.0170.06018.71
5.4.380.0300.05018.73
5.4.370.0230.05318.57
5.4.360.0370.05018.80
5.4.350.0300.06318.43
5.4.340.0400.04318.73
5.4.320.0230.06018.72
5.4.310.0270.06318.57
5.4.300.0730.05718.73
5.4.290.0430.04018.47
5.4.280.0100.06018.46
5.4.270.0630.05018.77
5.4.260.0370.04718.82
5.4.250.0270.06318.47
5.4.240.0600.06018.77
5.4.230.0270.05318.59
5.4.220.0670.05318.69
5.4.210.0300.06018.55
5.4.200.0370.04716.59
5.4.190.0370.06318.81
5.4.180.0230.06718.55
5.4.170.0400.05018.71
5.4.160.0300.06318.80
5.4.150.0330.05718.71
5.4.140.0230.05716.30
5.4.130.0370.04716.19
5.4.120.0370.07316.22
5.4.110.0270.06316.25
5.4.100.0270.05716.35
5.4.90.0430.05016.24
5.4.80.0500.05016.34
5.4.70.0300.06316.25
5.4.60.0470.04316.24
5.4.50.0270.07016.24
5.4.40.0330.06316.24
5.4.30.0330.05716.26
5.4.20.0900.06316.29
5.4.10.0370.05016.22
5.4.00.0170.06315.73
5.3.290.0370.07314.72
5.3.280.0230.06714.63
5.3.270.1000.05714.66
5.3.260.0230.06014.82
5.3.250.1030.06014.71
5.3.240.0300.06314.60
5.3.230.0200.07314.59
5.3.220.0270.06314.75
5.3.210.0900.05014.75
5.3.200.0430.04714.70
5.3.190.0130.05714.65
5.3.180.0400.06714.70
5.3.170.0270.06314.67
5.3.160.0300.04714.75
5.3.150.0330.05314.74
5.3.140.0430.04714.79
5.3.130.0230.07014.77
5.3.120.0370.05714.57
5.3.110.0200.08314.72
5.3.100.0270.06014.07
5.3.90.0330.06014.20
5.3.80.0300.05714.01
5.3.70.0370.06714.01
5.3.60.0370.05714.04
5.3.50.0870.05714.07
5.3.40.0330.05714.16
5.3.30.0270.06013.91
5.3.20.0370.07013.70
5.3.10.1130.06013.79
5.3.00.0370.05013.64
5.2.170.0270.05311.22
5.2.160.0200.04711.19
5.2.150.0300.05011.13
5.2.140.0070.05711.17
5.2.130.0370.04011.21
5.2.120.0230.04011.18
5.2.110.0270.04011.24
5.2.100.0230.04011.13
5.2.90.0230.04711.15
5.2.80.0200.04711.22
5.2.70.0130.05011.32
5.2.60.0100.05311.20
5.2.50.0200.04711.06
5.2.40.0070.05710.99
5.2.30.0170.04311.00
5.2.20.0200.03711.19
5.2.10.0230.03011.02
5.2.00.0100.05010.77
5.1.60.0230.03310.13
5.1.50.0170.03710.04
5.1.40.0200.0309.98
5.1.30.0270.03310.34
5.1.20.0270.03010.46
5.1.10.0270.04710.25
5.1.00.0170.03710.09
5.0.50.0100.0408.76
5.0.40.0470.0408.55
5.0.30.0170.0538.42
5.0.20.0070.0438.33
5.0.10.0170.0338.37
5.0.00.0100.0608.20
4.4.90.0070.0375.91
4.4.80.0100.0305.88
4.4.70.0300.0235.87
4.4.60.0100.0335.89
4.4.50.0100.0335.91
4.4.40.0100.0475.92
4.4.30.0130.0305.89
4.4.20.0070.0335.97
4.4.10.0100.0335.94
4.4.00.0130.0435.94
4.3.110.0070.0375.91
4.3.100.0100.0335.82
4.3.90.0130.0305.81
4.3.80.0200.0405.80
4.3.70.0070.0235.80
4.3.60.0070.0275.79
4.3.50.0070.0275.78
4.3.40.0530.0405.79
4.3.30.0070.0204.61
4.3.20.0130.0174.57
4.3.10.0100.0174.49
4.3.00.0030.0207.04

preferences:
69.2 ms | 400 KiB | 5 Q