3v4l.org

run code in 300+ PHP versions simultaneously
<?php class QueryHandler { public $input; public function render(Closure $query){ $this->input = "test"; $query(); } } class MyQuery{ public $handler; public function __construct(){ $this->handler = new QueryHandler; } public function query(){ return function () { echo $this->handler->input; }; } public function render(){ $this->handler($this->query()); } } echo "start"."\n"; $myQuery = new MyQuery; $myQuery->render();

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.0000.01417.00
8.3.50.0130.00721.27
8.3.40.0130.00318.79
8.3.30.0110.00418.83
8.3.20.0080.00020.16
8.3.10.0060.00321.77
8.3.00.0030.00619.44
8.2.180.0070.01118.41
8.2.170.0120.00322.96
8.2.160.0140.00720.29
8.2.150.0050.00324.18
8.2.140.0120.00624.66
8.2.130.0050.00326.16
8.2.120.0060.00317.63
8.2.110.0030.00620.44
8.2.100.0090.00317.63
8.2.90.0060.00319.13
8.2.80.0080.00017.97
8.2.70.0000.00817.63
8.2.60.0030.00517.92
8.2.50.0000.00818.07
8.2.40.0060.00321.20
8.2.30.0040.00418.09
8.2.20.0040.00417.55
8.2.10.0040.00418.04
8.2.00.0040.00417.90
8.1.280.0120.00325.92
8.1.270.0080.00020.30
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0000.00923.92
8.1.230.0080.00417.48
8.1.220.0050.00317.74
8.1.210.0030.00518.77
8.1.200.0000.01017.36
8.1.190.0040.00417.13
8.1.180.0040.00418.10
8.1.170.0040.00418.46
8.1.160.0030.00621.86
8.1.150.0060.00318.82
8.1.140.0030.00517.45
8.1.130.0030.00317.68
8.1.120.0000.00717.44
8.1.110.0040.00417.36
8.1.100.0000.00817.32
8.1.90.0000.00717.38
8.1.80.0050.00217.30
8.1.70.0040.00417.45
8.1.60.0060.00617.55
8.1.50.0090.00017.45
8.1.40.0030.00517.49
8.1.30.0060.00317.60
8.1.20.0090.00017.59
8.1.10.0040.00417.63
8.1.00.0000.00717.48
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0070.00018.39
8.0.270.0040.00417.27
8.0.260.0030.00617.26
8.0.250.0000.00716.98
8.0.240.0030.00316.95
8.0.230.0000.00716.93
8.0.220.0000.00816.88
8.0.210.0040.00416.87
8.0.200.0040.00416.99
8.0.190.0060.00316.93
8.0.180.0030.00616.86
8.0.170.0030.00616.95
8.0.160.0070.00017.00
8.0.150.0030.00316.91
8.0.140.0070.00016.80
8.0.130.0060.00013.35
8.0.120.0000.00816.91
8.0.110.0070.00016.80
8.0.100.0060.00316.78
8.0.90.0040.00416.89
8.0.80.0060.01016.95
8.0.70.0040.00416.69
8.0.60.0070.00016.73
8.0.50.0000.00816.69
8.0.30.0110.00617.12
8.0.20.0080.01117.40
8.0.10.0000.00717.08
8.0.00.0120.00716.67
7.4.330.0000.00515.09
7.4.320.0070.00016.47
7.4.300.0060.00316.54
7.4.290.0120.00016.41
7.4.280.0060.00316.59
7.4.270.0000.00716.50
7.4.260.0040.00416.46
7.4.250.0040.00416.58
7.4.240.0000.00716.49
7.4.230.0030.00316.39
7.4.220.0040.01816.57
7.4.210.0030.01316.53
7.4.200.0070.00016.52
7.4.160.0090.00616.50
7.4.150.0060.01217.40
7.4.140.0130.00817.86
7.4.130.0100.01116.59
7.4.120.0110.00816.43
7.4.110.0090.00916.61
7.4.100.0100.00716.59
7.4.90.0090.00916.50
7.4.80.0140.00619.39
7.4.70.0110.00816.42
7.4.60.0100.00716.47
7.4.50.0000.00816.58
7.4.40.0110.00716.32
7.4.30.0140.00716.38
7.4.00.0110.00414.98
7.3.330.0050.00013.38
7.3.320.0000.00513.23
7.3.310.0030.00316.40
7.3.300.0070.00016.23
7.3.290.0070.00716.33
7.3.280.0110.00716.35
7.3.270.0090.00917.40
7.3.260.0130.00316.49
7.3.250.0070.01416.43
7.3.240.0070.01016.57
7.3.230.0130.01016.39
7.3.210.0060.01116.33
7.3.200.0100.00616.36
7.3.190.0070.01016.51
7.3.180.0060.01016.57
7.3.170.0000.01716.31
7.3.160.0090.00716.50
7.2.330.0000.01716.71
7.2.320.0080.01416.49
7.2.310.0090.00916.67
7.2.300.0070.01416.79
7.2.290.0080.00816.67
7.2.60.0030.00916.91
7.2.00.0040.01119.51
7.1.200.0030.01115.64
7.1.100.0030.00918.24
7.1.70.0040.00416.86
7.1.60.0070.01720.03
7.1.50.0140.00716.88
7.1.00.0030.04322.32
7.0.200.0120.00614.71
7.0.60.0170.05319.94
7.0.50.0070.08017.96
7.0.40.0130.08320.40
7.0.30.0230.06020.24
7.0.20.0200.03720.19
7.0.10.0070.06320.07
7.0.00.0070.07320.20
5.6.280.0000.05320.92
5.6.210.0070.08020.62
5.6.200.0070.08318.29
5.6.190.0070.05320.77
5.6.180.0270.04720.33
5.6.170.0300.03720.56
5.6.160.0030.05720.45
5.6.150.0030.06318.18
5.6.140.0100.05018.16
5.6.130.0070.04318.18
5.6.120.0130.04020.91
5.6.110.0100.07021.01
5.6.100.0070.08020.98
5.6.90.0200.07321.06
5.6.80.0100.06320.28
5.6.70.4370.03320.49
5.5.350.0170.07720.45
5.5.340.0070.07317.98
5.5.330.0070.08020.56
5.5.320.0100.04720.24
5.5.310.0270.07320.25
5.5.300.0100.05017.98
5.5.290.0170.07017.93
5.5.280.0130.03320.87
5.5.270.0070.08320.81
5.5.260.0100.08320.70
5.5.250.0000.04320.72
5.5.240.0000.08020.21
5.4.450.0470.06719.56
5.4.440.0570.06019.48
5.4.430.0570.05319.68
5.4.420.0430.05719.16
5.4.410.0470.05319.44
5.4.400.0400.05719.36
5.4.390.0570.04318.98
5.4.380.0530.04319.14
5.4.370.0530.05019.27
5.4.360.0500.05718.98
5.4.350.0530.05318.86
5.4.340.0500.05319.21
5.4.320.0600.04318.84
5.4.310.0470.05319.02
5.4.300.0570.04318.86
5.4.290.0600.04719.36
5.4.280.0470.05319.16
5.4.270.0470.05019.15
5.4.260.0470.05019.14
5.4.250.0430.05318.99
5.4.240.0500.05019.13
5.4.230.0430.05719.27
5.4.220.0400.06019.21
5.4.210.0500.04719.16
5.4.200.0530.05319.04
5.4.190.0500.04719.10
5.4.180.0500.04319.26
5.4.170.0500.04718.96
5.4.160.0530.04719.13
5.4.150.0500.05318.83
5.4.140.0570.04316.45
5.4.130.0570.04716.60
5.4.120.0530.05316.53
5.4.110.0530.05716.68
5.4.100.0530.05016.23
5.4.90.0470.05716.46
5.4.80.0600.04316.65
5.4.70.0330.05716.55
5.4.60.0100.04316.38
5.4.50.0000.07316.26
5.4.40.0030.04016.42
5.4.30.0030.05016.50
5.4.20.0170.03316.34

preferences:
50.27 ms | 401 KiB | 5 Q