3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { function __construct() { } function __invoke() { echo("Invoked\n"); } } $a = new a(); $a(); // Prints: Invoked class b { private $x; function __construct() { $this->x = new a(); $this->x(); } } $b = new b(); // Issues error: undefined method b::x

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.00816.88
8.3.50.0130.00522.05
8.3.40.0120.00918.79
8.3.30.0110.00418.76
8.3.20.0050.00320.13
8.3.10.0000.00823.48
8.3.00.0080.00019.50
8.2.180.0090.00916.88
8.2.170.0210.00022.96
8.2.160.0070.00722.07
8.2.150.0000.00825.66
8.2.140.0000.00824.66
8.2.130.0080.00417.50
8.2.120.0040.00426.35
8.2.110.0090.00020.88
8.2.100.0040.00817.78
8.2.90.0000.00719.21
8.2.80.0040.00417.97
8.2.70.0040.00417.75
8.2.60.0000.00718.03
8.2.50.0050.00318.10
8.2.40.0000.00719.30
8.2.30.0050.00320.63
8.2.20.0060.00317.69
8.2.10.0050.00217.93
8.2.00.0070.00017.91
8.1.280.0040.01125.92
8.1.270.0030.00722.24
8.1.260.0070.00028.09
8.1.250.0050.00328.09
8.1.240.0070.00323.88
8.1.230.0060.00617.45
8.1.220.0080.00017.74
8.1.210.0000.00918.77
8.1.200.0070.00317.35
8.1.190.0000.00817.35
8.1.180.0000.00818.10
8.1.170.0060.00318.71
8.1.160.0030.00322.00
8.1.150.0000.00718.83
8.1.140.0000.00819.57
8.1.130.0000.00917.70
8.1.120.0000.00717.39
8.1.110.0000.00717.45
8.1.100.0000.00717.44
8.1.90.0070.00017.29
8.1.80.0000.00717.41
8.1.70.0000.00717.44
8.1.60.0090.00317.60
8.1.50.0000.01117.53
8.1.40.0030.00517.54
8.1.30.0030.00517.63
8.1.20.0070.00017.51
8.1.10.0000.00717.56
8.1.00.0040.00417.51
8.0.300.0040.00318.77
8.0.290.0000.00816.75
8.0.280.0030.00318.46
8.0.270.0000.00717.14
8.0.260.0070.00017.25
8.0.250.0070.00016.91
8.0.240.0060.00016.95
8.0.230.0030.00516.89
8.0.220.0030.00316.80
8.0.210.0080.00016.79
8.0.200.0060.00016.95
8.0.190.0020.00516.94
8.0.180.0050.00316.92
8.0.170.0050.00316.88
8.0.160.0000.00716.93
8.0.150.0070.00016.73
8.0.140.0040.00716.80
8.0.130.0030.00613.36
8.0.120.0000.00816.85
8.0.110.0040.00416.84
8.0.100.0000.00716.78
8.0.90.0000.00716.80
8.0.80.0100.00716.85
8.0.70.0070.00016.77
8.0.60.0080.00016.78
8.0.50.0070.00016.77
8.0.30.0090.01016.98
8.0.20.0090.00917.40
8.0.10.0080.00017.08
8.0.00.0080.00916.65
7.4.330.0000.00516.73
7.4.320.0000.00716.50
7.4.300.0030.00316.52
7.4.290.0000.00716.61
7.4.280.0000.01016.64
7.4.270.0040.00416.63
7.4.260.0060.00316.46
7.4.250.0060.00316.48
7.4.240.0020.00516.53
7.4.230.0030.00516.64
7.4.220.0080.00916.61
7.4.210.0070.00716.56
7.4.200.0030.00316.41
7.4.160.0090.00616.60
7.4.150.0060.01217.40
7.4.140.0130.00817.86
7.4.130.0130.00616.39
7.4.120.0100.00816.41
7.4.110.0100.01016.46
7.4.100.0030.01316.46
7.4.90.0090.01216.56
7.4.80.0100.00619.39
7.4.70.0090.00916.66
7.4.60.0160.00016.69
7.4.50.0060.01016.38
7.4.40.0130.00316.75
7.4.30.0180.00316.21
7.4.00.0060.00615.07
7.3.330.0000.00613.23
7.3.320.0040.00413.39
7.3.310.0040.00416.18
7.3.300.0040.00416.21
7.3.290.0030.01116.34
7.3.280.0080.00616.36
7.3.270.0120.00417.40
7.3.260.0070.01016.55
7.3.240.0050.01216.46
7.3.230.0030.01416.39
7.3.210.0220.00016.32
7.3.200.0040.01916.34
7.3.190.0030.02016.57
7.3.180.0100.01016.49
7.3.170.0080.00816.28
7.3.160.0080.00816.37
7.3.10.0090.00616.09
7.3.00.0130.01016.33
7.2.330.0140.01116.73
7.2.320.0060.01216.62
7.2.310.0000.01616.68
7.2.300.0130.00316.38
7.2.290.0060.01716.72
7.2.130.0130.00316.70
7.2.120.0180.00316.46
7.2.110.0200.00716.69
7.2.100.0140.01416.83
7.2.90.0270.00016.86
7.2.80.0170.00016.23
7.2.70.0170.01016.64
7.2.60.0100.01216.67
7.2.50.0160.00616.19
7.2.40.0210.01416.76
7.2.30.0110.00716.55
7.2.20.0130.00616.43
7.2.10.0100.00316.61
7.2.00.0120.00617.72
7.1.250.0110.01115.21
7.1.200.0070.00715.37
7.1.100.0040.01217.89
7.1.70.0110.00717.05
7.1.60.0060.01919.48
7.1.50.0000.01616.88
7.1.00.0030.07722.32
7.0.200.0300.00414.75
7.0.60.0100.06319.98
7.0.50.0170.07017.87
7.0.40.0030.05020.02
7.0.30.0270.08020.27
7.0.20.0200.03720.14
7.0.10.0130.03720.15
7.0.00.0030.09020.23
5.6.280.0000.04021.14
5.6.210.0070.07020.75
5.6.200.0100.05018.16
5.6.190.0170.06720.45
5.6.180.0370.05020.39
5.6.170.0300.08020.55
5.6.160.0030.06020.54
5.6.150.0100.08018.19
5.6.140.0100.06318.28
5.6.130.0130.07718.11
5.6.120.0100.08021.02
5.6.110.0100.08021.01
5.6.100.0130.07021.04
5.6.90.0100.08320.98
5.6.80.0100.04020.41
5.5.350.4100.04020.38
5.5.340.0100.07018.05
5.5.330.0070.07020.35
5.5.320.0270.04020.51
5.5.310.0230.08020.27
5.5.300.0030.08718.06
5.5.290.0030.08718.04
5.5.280.0100.07720.97
5.5.270.0200.05320.90
5.5.260.0130.07720.96
5.5.250.0100.07320.75
5.5.240.0270.07020.26

preferences:
70.76 ms | 401 KiB | 5 Q