3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { protected $test = '1'; public function __construct(){ $a = function(){ var_dump($this); }; $a(); } public function xx($callback){ $callback(); } } $a = new X(); $a->xx(function(){ var_dump($this); });

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.40.0090.00618.64
8.3.30.0130.00318.79
8.3.20.0000.00720.13
8.3.10.0080.00023.52
8.3.00.0080.00023.49
8.2.170.0110.00322.96
8.2.160.0100.00322.03
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0100.00017.63
8.2.110.0100.00020.52
8.2.100.0060.00617.75
8.2.90.0080.00019.08
8.2.80.0030.00517.97
8.2.70.0070.00317.50
8.2.60.0030.00617.79
8.2.50.0050.00318.07
8.2.40.0000.00820.85
8.2.30.0000.01017.94
8.2.20.0040.00417.75
8.2.10.0040.00417.93
8.2.00.0040.00418.01
8.1.270.0090.00020.29
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0140.00323.95
8.1.230.0040.00817.65
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0070.00417.13
8.1.190.0000.00817.35
8.1.180.0090.00018.10
8.1.170.0040.00418.56
8.1.160.0000.00721.89
8.1.150.0000.00718.89
8.1.140.0040.00417.36
8.1.130.0070.00017.62
8.1.120.0000.00717.32
8.1.110.0040.00417.52
8.1.100.0040.00417.47
8.1.90.0000.01017.50
8.1.80.0000.00717.33
8.1.70.0030.00317.45
8.1.60.0060.00317.45
8.1.50.0030.00517.54
8.1.40.0000.00917.47
8.1.30.0040.00417.44
8.1.20.0040.00417.64
8.1.10.0030.00617.63
8.1.00.0000.00817.37
8.0.300.0030.00518.77
8.0.290.0040.00416.63
8.0.280.0000.00718.39
8.0.270.0030.00317.21
8.0.260.0000.00617.06
8.0.250.0050.00316.86
8.0.240.0070.00016.83
8.0.230.0070.00316.91
8.0.220.0030.00316.94
8.0.210.0040.00416.85
8.0.200.0000.00617.07
8.0.190.0040.00417.04
8.0.180.0000.00716.86
8.0.170.0080.00016.93
8.0.160.0000.00717.06
8.0.150.0030.00316.94
8.0.140.0040.00416.91
8.0.130.0040.00413.40
8.0.120.0040.00416.94
8.0.110.0040.00416.86
8.0.100.0000.00716.93
8.0.90.0070.00017.05
8.0.80.0100.00716.91
8.0.70.0000.00716.90
8.0.60.0000.00816.83
8.0.50.0050.00217.00
8.0.30.0080.01117.00
8.0.20.0110.00817.40
8.0.10.0040.00417.12
8.0.00.0070.01316.88
7.4.330.0000.00515.14
7.4.320.0060.00016.52
7.4.300.0000.00716.52
7.4.290.0040.00416.61
7.4.280.0030.00516.45
7.4.270.0030.00316.49
7.4.260.0050.00316.52
7.4.250.0040.00416.59
7.4.240.0040.00416.49
7.4.230.0000.00716.34
7.4.220.0120.00616.67
7.4.210.0080.00816.61
7.4.200.0000.00716.50
7.4.160.0100.00616.48
7.4.150.0040.01417.40
7.4.140.0140.00817.86
7.4.130.0100.00816.55
7.4.120.0080.01016.58
7.4.110.0070.01016.46
7.4.100.0060.01216.45
7.4.90.0070.01116.33
7.4.80.0120.01219.39
7.4.70.0060.01116.48
7.4.60.0060.01016.46
7.4.50.0030.00616.37
7.4.40.0060.01016.63
7.4.30.0030.01516.50
7.4.00.0070.01014.85
7.3.330.0050.00013.23
7.3.320.0030.00313.37
7.3.310.0070.00016.36
7.3.300.0030.00316.38
7.3.290.0090.00616.32
7.3.280.0110.00716.36
7.3.270.0140.01017.40
7.3.260.0140.01016.33
7.3.250.0110.00616.47
7.3.240.0060.01316.41
7.3.230.0130.00916.46
7.3.210.0080.00816.43
7.3.200.0100.01016.37
7.3.190.0050.01316.39
7.3.180.0070.01016.61
7.3.170.0060.01616.31
7.3.160.0070.01416.38
7.2.330.0080.01116.74
7.2.320.0030.01416.36
7.2.310.0170.00016.45
7.2.300.0160.00716.64
7.2.290.0080.01516.46
7.2.60.0110.00416.71
7.2.00.0060.00919.57
7.1.200.0110.00015.74
7.1.100.0040.01117.86
7.1.70.0030.00917.16
7.1.60.0110.01519.42
7.1.50.0110.01417.04
7.1.00.0070.07322.45
7.0.200.0100.00316.67
7.0.60.0070.07020.02
7.0.50.0170.07017.84
7.0.40.0070.08720.09
7.0.30.0630.06320.33
7.0.20.0270.04720.07
7.0.10.0130.08020.10
7.0.00.0030.04020.32
5.6.280.0030.07021.08
5.6.210.0030.08020.51
5.6.200.0070.08318.12
5.6.190.0030.04320.55
5.6.180.1930.04320.61
5.6.170.0270.06320.47
5.6.160.0070.03720.47
5.6.150.0100.06018.14
5.6.140.0070.04318.16
5.6.130.0030.08018.14
5.6.120.0170.07021.13
5.6.110.0100.08021.06
5.6.100.0130.07721.01
5.6.90.0070.08320.98
5.6.80.0070.04320.48
5.5.350.0070.06720.47
5.5.340.0100.04317.98
5.5.330.0030.05720.28
5.5.320.0300.07020.24
5.5.310.0270.07720.32
5.5.300.0070.07717.95
5.5.290.0170.03717.98
5.5.280.0000.08320.78
5.5.270.0100.08320.73
5.5.260.0100.08020.77
5.5.250.0030.08020.69
5.5.240.4300.03720.24
5.4.450.0870.06019.45
5.4.440.0970.05319.54
5.4.430.0800.04719.55
5.4.420.0900.08319.47
5.4.410.0900.05319.35
5.4.400.0830.05019.29
5.4.390.0670.05719.29
5.4.380.0830.05018.84
5.4.370.0600.05719.01
5.4.360.0630.06019.38
5.4.350.0700.05319.03
5.4.340.0870.06019.25
5.4.320.1000.05319.14
5.4.310.0670.05719.31
5.4.300.1030.07318.87
5.4.290.0830.05318.98
5.4.280.0930.06319.00
5.4.270.0700.05319.30
5.4.260.0700.05719.25
5.4.250.0600.06019.28
5.4.240.0100.05019.02
5.4.230.0000.06019.05
5.4.220.0270.06019.12
5.4.210.0700.05018.97
5.4.200.0730.05016.82
5.4.190.0800.05018.88
5.4.180.0170.04319.18
5.4.170.0100.05018.93
5.4.160.0370.05019.02
5.4.150.0830.05019.01
5.4.140.0830.05316.46
5.4.130.0870.04316.57
5.4.120.0800.04716.38
5.4.110.1000.05316.44
5.4.100.0700.05016.36
5.4.90.0770.05316.38
5.4.80.0700.05016.58
5.4.70.0730.04716.47
5.4.60.0770.05316.29
5.4.50.0700.04716.30
5.4.40.0830.04016.31
5.4.30.0670.05016.51
5.4.20.0900.04016.35
5.4.10.0700.04716.29
5.4.00.0800.04315.98
5.3.290.0830.04314.70
5.3.280.0670.05314.63
5.3.270.0800.05314.52
5.3.260.0670.06014.51
5.3.250.0630.05314.47
5.3.240.0770.04714.63
5.3.230.0800.05314.52
5.3.220.0800.05714.73
5.3.210.1100.04714.59
5.3.200.0800.06014.48
5.3.190.0770.07014.58
5.3.180.0800.04714.57
5.3.170.0770.04314.44
5.3.160.0730.05714.47
5.3.150.0870.04714.47
5.3.140.0730.05014.57
5.3.130.0700.05714.56
5.3.120.0830.06714.70
5.3.110.0700.05314.61
5.3.100.0830.04013.95
5.3.90.0630.05714.01
5.3.80.0770.05713.96
5.3.70.0770.05714.04
5.3.60.0800.05714.02
5.3.50.0870.04314.05
5.3.40.0870.04713.89
5.3.30.0970.04714.00
5.3.20.0870.04713.64
5.3.10.0900.04013.59
5.3.00.0970.04713.55
5.2.170.0700.04011.23
5.2.160.0770.04711.11
5.2.150.0970.05011.05
5.2.140.0630.03311.15
5.2.130.0570.04011.02
5.2.120.0500.05311.33
5.2.110.0700.04311.01
5.2.100.0670.04711.32
5.2.90.0570.04711.00
5.2.80.0800.03711.01
5.2.70.0630.04311.12
5.2.60.0600.04310.91
5.2.50.0730.04711.11
5.2.40.0670.03710.90
5.2.30.0530.04311.02
5.2.20.0600.04311.19
5.2.10.0730.04310.94
5.2.00.0570.05010.86
5.1.60.0600.0339.89
5.1.50.0400.04310.00
5.1.40.0570.0339.87
5.1.30.0700.04710.31
5.1.20.0500.04010.40
5.1.10.0600.03310.00
5.1.00.0530.0409.98
5.0.50.0300.0378.63
5.0.40.0300.0278.31
5.0.30.0230.0478.15
5.0.20.0300.0338.25
5.0.10.0230.0308.15
5.0.00.0170.0478.34
4.4.90.0230.0235.88
4.4.80.0230.0235.84
4.4.70.0230.0235.82
4.4.60.0230.0305.77
4.4.50.0230.0275.88
4.4.40.0300.0375.87
4.4.30.0200.0275.84
4.4.20.0330.0335.91
4.4.10.0230.0235.83
4.4.00.0230.0375.87
4.3.110.0270.0205.70
4.3.100.0300.0335.75
4.3.90.0400.0205.70
4.3.80.0330.0375.65
4.3.70.0230.0205.73
4.3.60.0200.0205.65
4.3.50.0230.0205.67
4.3.40.0200.0335.63
4.3.30.0070.0274.57
4.3.20.0030.0334.41
4.3.10.0130.0204.43
4.3.00.0170.0208.43

preferences:
49.53 ms | 400 KiB | 5 Q