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(Closure $query){ $this->handler($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.0070.00716.63
8.3.50.0100.00921.21
8.3.40.0170.00318.92
8.3.30.0070.00718.90
8.3.20.0080.00020.16
8.3.10.0040.00421.71
8.3.00.0000.00819.69
8.2.180.0120.00618.63
8.2.170.0120.00322.96
8.2.160.0070.01420.35
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00417.75
8.2.110.0060.00320.35
8.2.100.0060.00617.25
8.2.90.0030.00619.13
8.2.80.0000.00917.97
8.2.70.0050.00517.63
8.2.60.0040.00417.80
8.2.50.0090.00018.07
8.2.40.0030.00521.13
8.2.30.0040.00418.10
8.2.20.0000.00817.75
8.2.10.0000.00717.92
8.2.00.0000.00718.00
8.1.280.0110.00325.92
8.1.270.0080.00020.29
8.1.260.0070.00026.35
8.1.250.0070.01128.09
8.1.240.0060.00323.82
8.1.230.0060.00617.42
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0040.00417.22
8.1.180.0050.00318.10
8.1.170.0040.00418.58
8.1.160.0000.00721.86
8.1.150.0090.00018.83
8.1.140.0040.00417.38
8.1.130.0030.00617.68
8.1.120.0030.00517.38
8.1.110.0000.00717.41
8.1.100.0000.00717.40
8.1.90.0030.00517.44
8.1.80.0060.00317.45
8.1.70.0070.00017.44
8.1.60.0070.00417.64
8.1.50.0050.00317.46
8.1.40.0050.00317.42
8.1.30.0030.00617.55
8.1.20.0040.00417.62
8.1.10.0000.00817.63
8.1.00.0040.00417.48
8.0.300.0020.00518.77
8.0.290.0000.00816.75
8.0.280.0030.00318.37
8.0.270.0000.00717.27
8.0.260.0000.00717.26
8.0.250.0090.00016.80
8.0.240.0070.00016.90
8.0.230.0050.00316.93
8.0.220.0030.00316.89
8.0.210.0000.00816.77
8.0.200.0030.00317.01
8.0.190.0040.00416.93
8.0.180.0030.00616.94
8.0.170.0040.00416.93
8.0.160.0040.00416.95
8.0.150.0060.00316.88
8.0.140.0030.00516.88
8.0.130.0030.00313.39
8.0.120.0050.00316.88
8.0.110.0040.00416.73
8.0.100.0000.00716.71
8.0.90.0000.00716.85
8.0.80.0150.00616.89
8.0.70.0080.00016.94
8.0.60.0070.00016.77
8.0.50.0050.00216.87
8.0.30.0130.00517.08
8.0.20.0080.01017.40
8.0.10.0040.00416.91
8.0.00.0100.00717.05
7.4.330.0050.00015.08
7.4.320.0040.00416.51
7.4.300.0000.00616.55
7.4.290.0030.00316.59
7.4.280.0080.00416.52
7.4.270.0030.00316.51
7.4.260.0000.00716.59
7.4.250.0040.00416.53
7.4.240.0020.00516.63
7.4.230.0000.00716.36
7.4.220.0090.00916.53
7.4.210.0070.00716.55
7.4.200.0030.00316.48
7.4.160.0160.00016.35
7.4.150.0100.01017.40
7.4.140.0170.00617.86
7.4.130.0060.01216.59
7.4.120.0080.01016.47
7.4.110.0170.00616.35
7.4.100.0090.00916.55
7.4.90.0060.01216.39
7.4.80.0070.01419.39
7.4.70.0140.00316.52
7.4.60.0070.01016.51
7.4.50.0050.00016.43
7.4.40.0070.01316.46
7.4.30.0060.01616.54
7.4.00.0100.00615.18
7.3.330.0050.00013.30
7.3.320.0020.00213.37
7.3.310.0070.00016.26
7.3.300.0070.00016.24
7.3.290.0120.00716.35
7.3.280.0110.00916.37
7.3.270.0060.01117.40
7.3.260.0040.01416.50
7.3.250.0150.00316.39
7.3.240.0100.00716.51
7.3.230.0110.00516.39
7.3.210.0030.01316.39
7.3.200.0100.00716.62
7.3.190.0070.01016.49
7.3.180.0100.00716.46
7.3.170.0050.01116.40
7.3.160.0100.00716.39
7.2.330.0080.00816.68
7.2.320.0100.01016.71
7.2.310.0060.01016.46
7.2.300.0000.02316.64
7.2.290.0120.00616.80
7.2.60.0030.01017.03
7.1.200.0000.01015.57
7.1.70.0040.00416.96
7.1.60.0170.00720.03
7.1.50.0070.01716.55
7.1.00.0000.04722.50
7.0.200.0210.00014.97
7.0.60.0070.07319.84
7.0.50.0030.07717.89
7.0.40.0170.05319.96
7.0.30.0470.05720.07
7.0.20.0170.04320.07
7.0.10.0000.05720.25
7.0.00.0100.07720.25
5.6.280.0100.06721.14
5.6.210.0130.07320.52
5.6.200.0070.05318.24
5.6.190.0170.08020.61
5.6.180.4100.04320.77
5.6.170.0500.07020.50
5.6.160.0030.08720.50
5.6.150.0100.08018.15
5.6.140.0000.09018.16
5.6.130.0070.08018.15
5.6.120.0070.09021.02
5.6.110.0030.08721.16
5.6.100.0070.08321.16
5.6.90.0100.07021.01
5.6.80.0100.04720.39
5.6.70.4400.05020.39
5.5.350.0230.07020.50
5.5.340.0070.06718.09
5.5.330.0000.05020.42
5.5.320.3100.04020.31
5.5.310.0270.08320.34
5.5.300.0170.07318.08
5.5.290.0070.08317.95
5.5.280.0100.08020.79
5.5.270.0170.07720.97
5.5.260.0030.08020.81
5.5.250.0030.09020.70
5.5.240.0300.07720.15
5.4.450.0670.04719.20
5.4.440.0770.05319.64
5.4.430.0630.07019.59
5.4.420.0630.04319.39
5.4.410.0600.04719.24
5.4.400.0600.04718.84
5.4.390.0470.06018.83
5.4.380.0470.05018.86
5.4.370.0530.06019.00
5.4.360.0500.06019.14
5.4.350.0570.05719.30
5.4.340.0670.05318.86
5.4.320.0470.06318.83
5.4.310.0500.05719.16
5.4.300.0570.05018.83
5.4.290.0630.04719.15
5.4.280.0530.04719.23
5.4.270.0530.04719.24
5.4.260.0630.04319.11
5.4.250.0670.05019.04
5.4.240.0700.05018.99
5.4.230.0570.05319.04
5.4.220.0570.05319.24
5.4.210.0630.04719.14
5.4.200.0500.07719.23
5.4.190.0570.04319.20
5.4.180.0500.06019.22
5.4.170.0630.03719.13
5.4.160.0700.06719.22
5.4.150.0500.05319.10
5.4.140.0430.05316.46
5.4.130.0500.04716.52
5.4.120.0500.04716.35
5.4.110.0500.05016.64
5.4.100.0470.05316.57
5.4.90.0470.04716.29
5.4.80.0630.04316.48
5.4.70.0000.06316.23
5.4.60.0170.03716.59
5.4.50.0030.07016.26
5.4.40.0230.05716.43
5.4.30.0300.05316.43
5.4.20.0270.04016.52

preferences:
40.5 ms | 401 KiB | 5 Q