3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { const OMG = 10; public static $WTF = 12; public function get($what) { return constant("self::" . $what); } } class Test2 { private $test; public function __construct(Test $test) { $this->test = $test; } public function testFunc() { var_dump($this->test->WTF); var_dump($this->test->get("OMG")); } } $test = new Test(); $test2 = new Test2($test); var_dump($test2->testFunc());

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.0090.01216.63
8.3.50.0140.00522.05
8.3.40.0090.00618.79
8.3.30.0170.00319.06
8.3.20.0090.00020.34
8.3.10.0000.00723.61
8.3.00.0040.00419.68
8.2.180.0130.01018.56
8.2.170.0100.01022.96
8.2.160.0040.01120.35
8.2.150.0000.00724.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00021.05
8.2.110.0060.00321.96
8.2.100.0070.00417.89
8.2.90.0040.00419.20
8.2.80.0050.00317.97
8.2.70.0080.00017.63
8.2.60.0080.00017.68
8.2.50.0000.00818.07
8.2.40.0080.00018.22
8.2.30.0000.00718.29
8.2.20.0070.00017.61
8.2.10.0040.00418.11
8.2.00.0040.00417.68
8.1.280.0110.01125.92
8.1.270.0080.00024.04
8.1.260.0070.00026.35
8.1.250.0050.00228.09
8.1.240.0060.00323.97
8.1.230.0070.00419.00
8.1.220.0080.00017.74
8.1.210.0000.00918.77
8.1.200.0060.00317.35
8.1.190.0040.00417.36
8.1.180.0000.00818.10
8.1.170.0040.00418.39
8.1.160.0040.00421.91
8.1.150.0030.00618.86
8.1.140.0040.00417.50
8.1.130.0030.00317.86
8.1.120.0000.00717.45
8.1.110.0070.00017.27
8.1.100.0050.00517.26
8.1.90.0070.00017.45
8.1.80.0040.00417.34
8.1.70.0070.00017.28
8.1.60.0060.00317.57
8.1.50.0000.00817.46
8.1.40.0000.00917.55
8.1.30.0000.00817.68
8.1.20.0040.00417.73
8.1.10.0040.00417.52
8.1.00.0040.00417.50
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00818.43
8.0.270.0050.00317.26
8.0.260.0030.00317.18
8.0.250.0000.00716.99
8.0.240.0060.00317.11
8.0.230.0070.00016.97
8.0.220.0000.00716.86
8.0.210.0070.00016.84
8.0.200.0030.00317.01
8.0.190.0040.00417.00
8.0.180.0040.00416.96
8.0.170.0050.00317.03
8.0.160.0070.00016.85
8.0.150.0030.00316.82
8.0.140.0070.00016.81
8.0.130.0030.00313.40
8.0.120.0040.00416.87
8.0.110.0030.00517.01
8.0.100.0040.00416.79
8.0.90.0070.00016.71
8.0.80.0100.00716.77
8.0.70.0080.00016.80
8.0.60.0040.00416.78
8.0.50.0040.00416.76
8.0.30.0130.01117.01
8.0.20.0130.00917.40
8.0.10.0080.00017.03
8.0.00.0100.00716.72
7.4.330.0030.00315.07
7.4.320.0060.00016.62
7.4.300.0040.00416.46
7.4.290.0070.00016.57
7.4.280.0000.00716.57
7.4.270.0070.00016.58
7.4.260.0050.00216.34
7.4.250.0080.00016.54
7.4.240.0020.00516.52
7.4.230.0000.00716.44
7.4.220.0120.00616.51
7.4.210.0080.00616.53
7.4.200.0080.00016.69
7.4.160.0150.03316.67
7.4.150.0000.01717.40
7.4.140.0170.00517.86
7.4.130.0110.00616.51
7.4.120.0140.00316.62
7.4.110.0070.01016.61
7.4.100.0130.01016.57
7.4.90.0160.00416.51
7.4.80.0090.00919.39
7.4.70.0110.01116.61
7.4.60.0100.00716.43
7.4.50.0000.00516.34
7.4.40.0120.00416.52
7.4.30.0090.00616.35
7.4.00.0060.00615.04
7.3.330.0030.00313.25
7.3.320.0000.00613.16
7.3.310.0030.00316.11
7.3.300.0040.00416.13
7.3.290.0060.01016.31
7.3.280.0070.00916.29
7.3.270.0100.00717.40
7.3.260.0070.01016.34
7.3.250.0140.00616.30
7.3.240.0030.01416.34
7.3.230.0030.01416.41
7.3.210.0060.01016.39
7.3.200.0060.01019.39
7.3.190.0120.00616.53
7.3.180.0170.00016.35
7.3.170.0120.00316.27
7.3.160.0070.01016.45
7.3.120.0070.00714.78
7.2.330.0040.01516.36
7.2.320.0090.00916.35
7.2.310.0100.00616.73
7.2.300.0060.01516.54
7.2.290.0040.01216.45
7.2.60.0080.00816.55
7.2.00.0040.01119.20
7.1.200.0040.00715.88
7.1.100.0040.01118.02
7.1.70.0040.00417.02
7.1.60.0090.01619.70
7.1.50.0070.01316.61
7.1.00.0000.08022.46
7.0.200.0080.00016.47
7.0.140.0030.07322.11
7.0.60.0200.03719.93
7.0.50.0070.06317.83
7.0.40.0030.04720.05
7.0.30.0230.05720.33
7.0.20.0330.07020.22
7.0.10.0100.04720.33
7.0.00.0100.06320.15
5.6.280.0000.07720.79
5.6.210.0000.04320.55
5.6.200.0030.07018.14
5.6.190.0100.08720.67
5.6.180.0000.06320.68
5.6.170.0230.08020.56
5.6.160.0070.05720.39
5.6.150.0100.03718.18
5.6.140.0170.03318.18
5.6.130.0100.07318.24
5.6.120.0070.03720.99
5.6.110.0030.04321.10
5.6.100.0230.06720.97
5.6.90.0030.05321.14
5.6.80.0030.04320.51
5.6.70.0100.07020.38
5.5.350.0070.05320.41
5.5.340.0070.07017.95
5.5.330.0200.07020.28
5.5.320.0230.04720.36
5.5.310.0270.06720.30
5.5.300.0070.07317.92
5.5.290.0030.08318.07
5.5.280.0070.04320.68
5.5.270.0200.04020.89
5.5.260.0200.06720.96
5.5.250.0030.07320.55
5.5.240.0130.08020.16
5.4.450.0370.03719.39
5.4.440.0530.04719.56
5.4.430.0270.04043.94
5.4.420.0630.03343.92
5.4.410.0300.04743.92
5.4.400.0400.03043.91
5.4.390.0630.03343.90
5.4.380.0130.04718.54
5.4.370.0130.04318.75
5.4.360.0030.05018.60
5.4.350.0300.04018.76
5.4.340.0070.06018.73
5.4.320.0090.04312.50
5.4.310.0070.03612.50
5.4.300.0090.03312.51
5.4.290.0060.03812.50
5.4.280.0090.03212.40
5.4.270.0050.03812.39
5.4.260.0040.04012.40
5.4.250.0110.03312.40
5.4.240.0090.03812.40
5.4.230.0070.04012.39
5.4.220.0080.03612.39
5.4.210.0060.03612.39
5.4.200.0060.03812.39
5.4.190.0060.03612.39
5.4.180.0080.03512.39
5.4.170.0080.03612.39
5.4.160.0080.03512.39
5.4.150.0050.03712.39
5.4.140.0080.03512.07
5.4.130.0080.04612.06
5.4.120.0080.03312.02
5.4.110.0050.03612.02
5.4.100.0080.03412.02
5.4.90.0060.03712.02
5.4.80.0060.03712.02
5.4.70.0040.03512.01
5.4.60.0020.03812.02
5.4.50.0040.03712.02
5.4.40.0050.03512.00
5.4.30.0050.03611.99
5.4.20.0040.03712.00
5.4.10.0070.03412.00
5.4.00.0080.03411.48
5.3.290.0080.03712.80
5.3.280.0090.03512.71
5.3.270.0150.03012.72
5.3.260.0040.04112.72
5.3.250.0080.03512.72
5.3.240.0080.03612.72
5.3.230.0030.04112.71
5.3.220.0040.04012.68
5.3.210.0090.03712.68
5.3.200.0070.03612.68
5.3.190.0070.03612.68
5.3.180.0060.03712.68
5.3.170.0060.03812.67
5.3.160.0080.04512.67
5.3.150.0050.03912.68
5.3.140.0060.03812.66
5.3.130.0070.03812.66
5.3.120.0080.03812.66
5.3.110.0050.04012.66
5.3.100.0040.03912.13
5.3.90.0050.03712.11
5.3.80.0040.03912.09
5.3.70.0100.03812.10
5.3.60.0110.03112.08
5.3.50.0050.03712.03
5.3.40.0060.03712.03
5.3.30.0050.03511.99
5.3.20.0080.03411.77
5.3.10.0090.03111.73
5.3.00.0050.03811.72
5.2.170.0040.0329.23
5.2.160.0060.0419.23
5.2.150.0060.0319.22
5.2.140.0030.0329.22
5.2.130.0080.0269.18
5.2.120.0040.0299.18
5.2.110.0070.0289.19
5.2.100.0040.0299.18
5.2.90.0070.0279.18
5.2.80.0050.0309.18
5.2.70.0060.0299.18
5.2.60.0030.0329.13
5.2.50.0040.0319.10
5.2.40.0060.0289.07
5.2.30.0030.0329.05
5.2.20.0040.0299.04
5.2.10.0020.0348.95
5.2.00.0060.0288.81
5.1.60.0060.0238.09
5.1.50.0060.0238.09
5.1.40.0040.0258.07
5.1.30.0050.0268.42
5.1.20.0080.0238.44
5.1.10.0060.0248.16
5.1.00.0050.0258.16
5.0.50.0060.0196.65
5.0.40.0020.0216.51
5.0.30.0040.0316.32
5.0.20.0040.0196.29
5.0.10.0030.0216.27
5.0.00.0040.0316.25
4.4.90.0040.0144.78
4.4.80.0040.0144.76
4.4.70.0020.0164.75
4.4.60.0040.0154.76
4.4.50.0010.0174.77
4.4.40.0040.0244.71
4.4.30.0050.0244.76
4.4.20.0020.0204.85
4.4.10.0040.0154.85
4.4.00.0040.0244.76
4.3.110.0030.0154.66
4.3.100.0010.0174.66
4.3.90.0050.0124.64
4.3.80.0040.0234.58
4.3.70.0020.0154.63
4.3.60.0040.0134.63
4.3.50.0040.0144.63
4.3.40.0060.0214.54
4.3.30.0020.0163.30
4.3.20.0030.0193.28
4.3.10.0040.0183.24
4.3.00.0070.01743.90

preferences:
39.02 ms | 401 KiB | 5 Q