3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface classThing { public function getClass(); public function setClass($class); } class Something implements classThing { private $class; public function setClass($class) { $this->class = $class; } public function getClass() { return $this->class; } } $header = array(new Something); if ($header[0] instanceof classThing && $class = $header[0]->getClass()) { echo $class; } else { echo 'not set'; } $header[0]->setClass('bla'); if ($header[0] instanceof classThing && $class = $header[0]->getClass()) { echo $class; } else { echo 'not set'; }

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.0000.01518.68
8.3.50.0110.00722.06
8.3.40.0100.01018.79
8.3.30.0110.00319.18
8.3.20.0040.00420.16
8.3.10.0080.00020.54
8.3.00.0080.00019.38
8.2.180.0070.01016.38
8.2.170.0110.00422.96
8.2.160.0120.00620.24
8.2.150.0030.00524.18
8.2.140.0030.00624.66
8.2.130.0070.00026.16
8.2.120.0080.00022.29
8.2.110.0060.00320.30
8.2.100.0040.00717.97
8.2.90.0090.00019.17
8.2.80.0030.00617.97
8.2.70.0040.00417.75
8.2.60.0000.00817.93
8.2.50.0040.00418.07
8.2.40.0050.00319.94
8.2.30.0060.00318.02
8.2.20.0000.00817.84
8.2.10.0050.00218.00
8.2.00.0030.00617.66
8.1.280.0110.01125.92
8.1.270.0080.00023.95
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0060.00323.91
8.1.230.0070.00419.07
8.1.220.0060.00317.74
8.1.210.0060.00318.77
8.1.200.0060.00317.23
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0040.00418.58
8.1.160.0040.00422.03
8.1.150.0020.00518.77
8.1.140.0070.00017.50
8.1.130.0070.00017.75
8.1.120.0000.00717.46
8.1.110.0040.00417.44
8.1.100.0000.00717.43
8.1.90.0030.00617.44
8.1.80.0000.00717.32
8.1.70.0000.00717.39
8.1.60.0050.00317.62
8.1.50.0030.00517.50
8.1.40.0040.00417.40
8.1.30.0030.00517.58
8.1.20.0030.00517.59
8.1.10.0070.00017.61
8.1.00.0030.00717.55
8.0.300.0000.00718.77
8.0.290.0040.00416.58
8.0.280.0000.00718.37
8.0.270.0030.00317.16
8.0.260.0060.00017.27
8.0.250.0050.00316.98
8.0.240.0040.00416.86
8.0.230.0070.00016.86
8.0.220.0030.00316.92
8.0.210.0000.00716.89
8.0.200.0030.00316.96
8.0.190.0040.00716.97
8.0.180.0000.00716.85
8.0.170.0000.00816.96
8.0.160.0060.00316.84
8.0.150.0070.00016.84
8.0.140.0000.00716.84
8.0.130.0060.00013.26
8.0.120.0030.00516.88
8.0.110.0040.00416.89
8.0.100.0050.00216.86
8.0.90.0070.00016.84
8.0.80.0080.00816.84
8.0.70.0000.00717.02
8.0.60.0000.00717.02
8.0.50.0000.00716.86
8.0.30.0110.01016.97
8.0.20.0120.00717.44
8.0.10.0070.00017.04
8.0.00.0060.01116.82
7.4.330.0000.00515.16
7.4.320.0040.00416.52
7.4.300.0060.00016.61
7.4.290.0040.00416.65
7.4.280.0000.00816.41
7.4.270.0030.00316.43
7.4.260.0000.00716.62
7.4.250.0070.00016.56
7.4.240.0020.00616.53
7.4.230.0040.00416.45
7.4.220.0090.00916.71
7.4.210.0000.01416.56
7.4.200.0000.00716.54
7.4.160.0070.01616.64
7.4.150.0090.00917.40
7.4.140.0080.01217.86
7.4.130.0110.00916.58
7.4.120.0040.01216.44
7.4.110.0140.00316.64
7.4.100.0060.01216.64
7.4.90.0090.00916.57
7.4.80.0090.00919.39
7.4.70.0150.00616.41
7.4.60.0070.01316.45
7.4.50.0000.00916.63
7.4.40.0090.00916.46
7.4.30.0030.01316.60
7.4.00.0070.00715.18
7.3.330.0000.00613.25
7.3.320.0030.00313.30
7.3.310.0000.00716.42
7.3.300.0000.00716.25
7.3.290.0030.01016.33
7.3.280.0120.00516.33
7.3.270.0090.01117.40
7.3.260.0130.01016.63
7.3.250.0090.01116.50
7.3.240.0060.01016.38
7.3.230.0070.01116.51
7.3.210.0100.00616.36
7.3.200.0130.01019.39
7.3.190.0160.00616.48
7.3.180.0000.01616.54
7.3.170.0030.01616.75
7.3.160.0100.00816.58
7.3.10.0080.00616.46
7.3.00.0070.00716.59
7.2.330.0070.01416.78
7.2.320.0030.01316.67
7.2.310.0100.00616.68
7.2.300.0160.00616.82
7.2.290.0060.01216.79
7.2.130.0040.00916.76
7.2.120.0080.00516.90
7.2.110.0070.00716.84
7.2.100.0060.00716.78
7.2.90.0040.01016.88
7.2.80.0070.00716.84
7.2.70.0070.00517.03
7.2.60.0050.00616.91
7.2.50.0060.00616.86
7.2.40.0050.00716.93
7.2.30.0080.00316.64
7.2.20.0050.00916.81
7.2.10.0030.00916.72
7.2.00.0060.00616.71
7.1.250.0090.00315.78
7.1.200.0120.00015.80
7.1.100.0070.00718.21
7.1.70.0040.00416.87
7.1.60.0120.00419.32
7.1.50.0100.01416.86
7.1.00.0070.07322.44
7.0.200.0030.00716.86
7.0.140.0000.07722.09
7.0.60.0230.05719.86
7.0.50.0030.04317.95
7.0.40.0000.05019.96
7.0.30.0270.04020.32
7.0.20.0330.07020.10
7.0.10.0100.05320.19
7.0.00.0030.09020.23
5.6.280.0070.06721.13
5.6.210.0030.08020.51
5.6.200.0130.07318.16
5.6.190.0070.08720.33
5.6.180.0330.05720.34
5.6.170.0270.04320.47
5.6.160.0070.08320.45
5.6.150.0170.07718.19
5.6.140.0030.04018.21
5.6.130.0070.07718.21
5.6.120.0130.08321.16
5.6.110.0070.07321.12
5.6.100.0070.08321.00
5.6.90.0000.09021.12
5.6.80.0100.04320.40
5.5.350.0000.06320.46
5.5.340.0130.06318.04
5.5.330.0100.06020.37
5.5.320.0100.08720.42
5.5.310.0130.04720.27
5.5.300.0130.05018.02
5.5.290.0030.05318.04
5.5.280.0030.04020.85
5.5.270.0000.04320.89
5.5.260.0230.06720.87
5.5.250.0130.03720.59
5.5.240.0100.04320.16
5.4.450.0870.05019.52
5.4.440.0500.04719.29
5.4.430.0370.04319.38
5.4.420.0630.00019.54
5.4.410.0630.00019.30
5.4.400.0630.00019.23
5.4.390.0630.00019.05
5.4.380.0670.00019.23
5.4.370.0870.00019.13
5.4.360.0570.00018.98
5.4.350.0700.00019.07
5.4.340.0830.00019.16
5.4.320.0080.03912.50
5.4.310.0090.03712.50
5.4.300.0100.03412.51
5.4.290.0080.03812.50
5.4.280.0090.03812.40
5.4.270.0080.04112.40
5.4.260.0070.03812.40
5.4.250.0060.04012.40
5.4.240.0060.03712.40
5.4.230.0050.04012.39
5.4.220.0060.03812.39
5.4.210.0040.03912.39
5.4.200.0080.03712.39
5.4.190.0080.03512.38
5.4.180.0100.04012.38
5.4.170.0080.03712.40
5.4.160.0060.04012.40
5.4.150.0080.03612.39
5.4.140.0060.03912.07
5.4.130.0060.03712.07
5.4.120.0070.03712.02
5.4.110.0090.03512.02
5.4.100.0070.04312.02
5.4.90.0070.04512.02
5.4.80.0100.03812.02
5.4.70.0090.03712.01
5.4.60.0090.03612.01
5.4.50.0100.03712.01
5.4.40.0070.03712.00
5.4.30.0060.04412.00
5.4.20.0110.04211.99
5.4.10.0120.04412.00
5.4.00.0090.05011.48
5.3.290.0080.05512.80
5.3.280.0150.04512.71
5.3.270.0100.05312.72
5.3.260.0100.04312.72
5.3.250.0080.03612.72
5.3.240.0050.04412.72
5.3.230.0110.03612.71
5.3.220.0090.04112.68
5.3.210.0110.04212.68
5.3.200.0110.05012.68
5.3.190.0070.04112.68
5.3.180.0060.04312.67
5.3.170.0050.05212.67
5.3.160.0100.04512.67
5.3.150.0100.04012.68
5.3.140.0080.04112.66
5.3.130.0100.05112.66
5.3.120.0080.05312.66
5.3.110.0120.05212.65
5.3.100.0100.04112.12
5.3.90.0080.04112.11
5.3.80.0120.05912.10
5.3.70.0070.05012.10
5.3.60.0070.04912.08
5.3.50.0090.04612.04
5.3.40.0080.04712.04
5.3.30.0110.04611.98
5.3.20.0090.04511.77
5.3.10.0120.04611.73
5.3.00.0090.04811.72
5.2.170.0070.0309.23
5.2.160.0070.0299.23
5.2.150.0020.0379.23
5.2.140.0100.0339.22
5.2.130.0040.0409.18
5.2.120.0080.0299.19
5.2.110.0040.0329.19
5.2.100.0060.0279.18
5.2.90.0050.0319.18
5.2.80.0040.0329.18
5.2.70.0070.0309.18
5.2.60.0050.0339.13
5.2.50.0080.0319.10
5.2.40.0050.0319.08
5.2.30.0050.0339.05
5.2.20.0060.0309.04
5.2.10.0050.0308.95
5.2.00.0050.0298.81
5.1.60.0060.0288.10
5.1.50.0090.0308.09
5.1.40.0030.0318.07
5.1.30.0020.0328.42
5.1.20.0070.0368.44
5.1.10.0080.0398.17
5.1.00.0150.0658.17
5.0.50.0070.0356.64
5.0.40.0060.0266.50
5.0.30.0090.0386.32
5.0.20.0030.0286.28
5.0.10.0060.0256.27
5.0.00.0070.0376.26
4.4.90.0030.0224.78
4.4.80.0070.0194.75
4.4.70.0050.0214.75
4.4.60.0030.0164.76
4.4.50.0030.0164.77
4.4.40.0030.0264.71
4.4.30.0040.0164.76
4.4.20.0030.0184.84
4.4.10.0050.0164.84
4.4.00.0050.0254.76
4.3.110.0000.0194.67
4.3.100.0040.0154.67
4.3.90.0030.0174.63
4.3.80.0090.0244.59
4.3.70.0070.0284.63
4.3.60.0060.0344.63
4.3.50.0110.0404.63
4.3.40.0130.0604.54
4.3.30.0100.0513.28
4.3.20.0050.0153.26
4.3.10.0010.0183.22
4.3.00.0070.01713.59

preferences:
40.7 ms | 401 KiB | 5 Q