3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { function foo() { if (isset($this)) { echo '$this is defined ('; echo get_class($this); echo ")\n"; } else { echo "\$this is not defined.\n"; } } } class B { function bar() { // Note: the next line will issue a warning if E_STRICT is enabled. A::foo(); } } $a = new A(); $a->foo(); // Note: the next line will issue a warning if E_STRICT is enabled. A::foo(); $b = new B(); $b->bar(); // Note: the next line will issue a warning if E_STRICT is enabled. B::bar(); ?>

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.70.0180.00018.31
8.3.60.0190.00416.88
8.3.50.0070.00922.04
8.3.40.0070.01418.79
8.3.30.0000.01419.04
8.3.20.0080.00020.31
8.3.10.0000.00723.71
8.3.00.0060.00918.96
8.2.180.0000.01618.29
8.2.170.0070.01422.96
8.2.160.0100.00320.53
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0080.00020.86
8.2.110.0030.00619.45
8.2.100.0080.00417.78
8.2.90.0060.00319.16
8.2.80.0000.00817.97
8.2.70.0040.00417.47
8.2.60.0040.00418.04
8.2.50.0030.00518.07
8.2.40.0030.00619.95
8.2.30.0000.00718.32
8.2.20.0040.00417.66
8.2.10.0030.00518.04
8.2.00.0050.00317.80
8.1.280.0110.00825.92
8.1.270.0000.00823.79
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0040.00421.39
8.1.230.0070.00417.45
8.1.220.0050.00317.74
8.1.210.0030.00518.77
8.1.200.0060.00317.22
8.1.190.0030.00517.23
8.1.180.0000.01118.10
8.1.170.0100.00018.68
8.1.160.0040.00421.97
8.1.150.0020.00618.48
8.1.140.0040.00817.36
8.1.130.0030.00317.84
8.1.120.0030.00317.44
8.1.110.0050.00317.38
8.1.100.0050.00217.34
8.1.90.0040.00417.49
8.1.80.0000.00717.46
8.1.70.0050.00217.35
8.1.60.0000.01017.63
8.1.50.0030.00517.54
8.1.40.0040.00417.42
8.1.30.0030.00617.55
8.1.20.0080.00017.69
8.1.10.0000.00717.53
8.1.00.0040.00417.41
8.0.300.0040.00418.77
8.0.290.0000.00816.75
8.0.280.0030.00318.45
8.0.270.0050.00217.15
8.0.260.0050.00317.21
8.0.250.0000.00716.95
8.0.240.0040.00416.95
8.0.230.0000.00717.00
8.0.220.0000.00616.88
8.0.210.0070.00016.97
8.0.200.0000.00616.99
8.0.190.0000.00716.94
8.0.180.0000.00716.95
8.0.170.0080.00016.94
8.0.160.0040.00416.93
8.0.150.0000.00716.77
8.0.140.0040.00416.84
8.0.130.0070.00013.35
8.0.120.0000.00816.80
8.0.110.0040.00416.83
8.0.100.0040.00416.74
8.0.90.0050.00216.71
8.0.80.0040.01116.87
8.0.70.0000.00716.74
8.0.60.0000.00716.97
8.0.50.0040.00416.79
8.0.30.0100.01217.13
8.0.20.0130.00617.40
8.0.10.0040.00417.01
8.0.00.0090.01116.85
7.4.330.0030.00315.06
7.4.320.0000.00716.47
7.4.300.0060.00016.53
7.4.290.0000.00716.62
7.4.280.0000.00716.55
7.4.270.0050.00316.59
7.4.260.0030.00316.49
7.4.250.0050.00316.58
7.4.240.0030.00516.54
7.4.230.0030.00316.50
7.4.220.0100.00916.66
7.4.210.0060.00916.59
7.4.200.0040.00416.60
7.4.190.0030.00516.66
7.4.160.0000.01616.52
7.4.150.0100.00717.40
7.4.140.0080.01217.86
7.4.130.0080.00816.71
7.4.120.0080.01016.48
7.4.110.0030.01416.38
7.4.100.0090.00916.56
7.4.90.0160.00016.35
7.4.80.0090.01419.39
7.4.70.0100.01016.50
7.4.60.0130.01016.43
7.4.50.0090.00016.29
7.4.40.0100.00616.32
7.4.30.0070.01016.58
7.4.00.0070.01015.05
7.3.330.0060.00013.29
7.3.320.0000.00513.34
7.3.310.0000.00716.37
7.3.300.0000.00616.27
7.3.290.0110.00416.39
7.3.280.0040.01116.31
7.3.270.0110.00717.40
7.3.260.0100.01016.41
7.3.250.0080.01216.41
7.3.240.0110.01116.54
7.3.230.0080.00816.39
7.3.210.0140.00416.27
7.3.200.0170.00319.39
7.3.190.0120.00916.41
7.3.180.0100.00716.38
7.3.170.0120.00916.49
7.3.160.0160.00716.22
7.3.120.0000.01814.82
7.2.330.0040.01416.75
7.2.320.0140.00916.43
7.2.310.0070.01616.39
7.2.300.0090.01216.68
7.2.290.0110.00916.48
7.2.60.0160.00016.99
7.1.200.0060.00615.68
7.1.70.0070.00317.16
7.1.60.0080.01519.46
7.1.50.0040.01116.57
7.1.00.0030.07722.31
7.0.200.0000.00716.41
7.0.140.0000.07322.21
7.0.60.0070.04020.04
7.0.50.0070.04317.89
7.0.40.0130.08320.05
7.0.30.0370.07320.06
7.0.20.0230.04020.33
7.0.10.0070.05320.12
7.0.00.0100.08020.19
5.6.280.0100.06720.82
5.6.210.0070.08320.52
5.6.200.0170.06318.23
5.6.190.0070.07720.51
5.6.180.0070.06720.62
5.6.170.0170.04020.48
5.6.160.0000.06720.50
5.6.150.0100.07718.19
5.6.140.0000.08318.13
5.6.130.0130.07318.13
5.6.120.0100.07721.04
5.6.110.0170.07021.02
5.6.100.0030.06021.00
5.6.90.0000.10021.13
5.6.80.0070.08020.40
5.5.350.0030.04320.42
5.5.340.0030.07017.95
5.5.330.0100.04020.40
5.5.320.0300.05320.27
5.5.310.0430.06020.26
5.5.300.0070.08317.94
5.5.290.0000.06718.07
5.5.280.0070.09020.66
5.5.270.0130.08020.98
5.5.260.0070.04720.68
5.5.250.0000.04320.55
5.5.240.0030.06020.24
5.4.450.0830.06319.31
5.4.440.0930.06019.34
5.4.430.0000.07019.63
5.4.420.0170.05719.44
5.4.410.0300.06019.44
5.4.400.0270.06319.10
5.4.390.0130.06019.21
5.4.380.0070.07718.81
5.4.370.0170.05318.70
5.4.360.0070.05718.68
5.4.350.0130.05318.75
5.4.340.0170.05018.76
5.4.320.0050.03812.50
5.4.310.0150.04412.50
5.4.300.0100.04612.51
5.4.290.0140.07012.50
5.4.280.0120.06012.40
5.4.270.0100.05312.40
5.4.260.0070.04912.40
5.4.250.0100.04512.40
5.4.240.0150.06212.39
5.4.230.0130.05312.39
5.4.220.0120.07012.39
5.4.210.0180.06112.39
5.4.200.0150.05412.39
5.4.190.0140.06912.39
5.4.180.0080.05612.38
5.4.170.0120.05612.40
5.4.160.0110.05012.40
5.4.150.0110.05612.39
5.4.140.0100.05112.07
5.4.130.0120.04412.06
5.4.120.0090.04812.02
5.4.110.0090.05212.02
5.4.100.0080.05612.01
5.4.90.0100.08012.02
5.4.80.0080.05512.01
5.4.70.0110.04712.01
5.4.60.0130.05912.01
5.4.50.0110.05212.01
5.4.40.0140.05612.00
5.4.30.0140.06212.00
5.4.20.0140.05812.00
5.4.10.0100.06211.99
5.4.00.0090.05011.48
5.3.290.0060.05612.80
5.3.280.0120.06812.71
5.3.270.0050.04312.73
5.3.260.0090.03912.72
5.3.250.0050.04112.72
5.3.240.0090.03612.72
5.3.230.0070.03912.70
5.3.220.0070.03912.68
5.3.210.0110.03712.68
5.3.200.0080.03712.68
5.3.190.0100.03712.68
5.3.180.0150.05312.67
5.3.170.0260.08512.67
5.3.160.0110.04812.68
5.3.150.0140.04812.67
5.3.140.0160.06612.66
5.3.130.0130.08712.66
5.3.120.0090.05912.66
5.3.110.0100.05512.66
5.3.100.0050.03912.12
5.3.90.0060.03712.10
5.3.80.0060.03712.10
5.3.70.0070.03912.10
5.3.60.0080.03612.08
5.3.50.0110.03112.03
5.3.40.0100.03312.03
5.3.30.0070.03411.98
5.3.20.0030.04011.77
5.3.10.0100.03211.73
5.3.00.0060.03811.72
5.2.170.0060.0319.22
5.2.160.0050.0329.22
5.2.150.0040.0379.22
5.2.140.0070.0389.22
5.2.130.0060.0329.18
5.2.120.0090.0349.18
5.2.110.0070.0429.19
5.2.100.0080.0299.18
5.2.90.0140.0959.18
5.2.80.0040.0439.18
5.2.70.0090.0389.18
5.2.60.0100.0419.13
5.2.50.0100.0429.10
5.2.40.0080.0389.08
5.2.30.0030.0459.05
5.2.20.0060.0299.04
5.2.10.0050.0288.95
5.2.00.0050.0298.81
5.1.60.0080.0228.09
5.1.50.0060.0248.09
5.1.40.0060.0248.07
5.1.30.0030.0288.41
5.1.20.0030.0298.45
5.1.10.0060.0268.16
5.1.00.0070.0348.17
5.0.50.0030.0226.64
5.0.40.0040.0206.50
5.0.30.0030.0326.32
5.0.20.0040.0206.29
5.0.10.0030.0216.27
5.0.00.0050.0296.25
4.4.90.0020.0194.78
4.4.80.0020.0234.75
4.4.70.0040.0134.76
4.4.60.0030.0144.75
4.4.50.0030.0154.77
4.4.40.0030.0254.71
4.4.30.0020.0174.76
4.4.20.0030.0194.85
4.4.10.0050.0134.85
4.4.00.0040.0244.76
4.3.110.0020.0164.67
4.3.100.0030.0144.66
4.3.90.0030.0144.64
4.3.80.0030.0244.59
4.3.70.0020.0154.63
4.3.60.0040.0164.63
4.3.50.0040.0154.63
4.3.40.0030.0274.54
4.3.30.0020.0153.31
4.3.20.0030.0153.29
4.3.10.0050.0123.24
4.3.00.0200.0207.27

preferences:
51.49 ms | 401 KiB | 5 Q