3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Declara a interface 'iTemplate' interface iTemplate { public function setVariable($name, $var); public function getHtml($template); } // Implementa a interface // Isso funcionará class Template implements iTemplate { private $vars = array(); public function setVariable($name, $var) { $this->vars[$name] = $var; } public function getHtml($template) { echo 'tchau'; } } // Isso NÃO funcionará // Fatal error: Class BadTemplate contains 1 abstract methods // and must therefore be declared abstract (iTemplate::getHtml) class BadTemplate extends Template { private $vars = array('x' => 'o'); public function getHtml($template) { echo 'oi'; } } $o = new BadTemplate(); $o->getHtml("aa {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.0140.00718.43
8.3.50.0150.00722.04
8.3.40.0070.00718.60
8.3.30.0140.00718.95
8.3.20.0000.00820.06
8.3.10.0190.00023.66
8.3.00.0040.00420.89
8.2.180.0090.01216.38
8.2.170.0070.00722.96
8.2.160.0090.00920.39
8.2.150.0060.00624.18
8.2.140.0070.01124.66
8.2.130.0120.00626.16
8.2.120.0080.00019.36
8.2.110.0190.00322.28
8.2.100.0100.00319.51
8.2.90.0040.00419.08
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0080.00417.80
8.2.50.0000.00918.07
8.2.40.0000.00819.95
8.2.30.0000.00718.29
8.2.20.0050.00317.56
8.2.10.0000.00718.02
8.2.00.0000.00919.32
8.1.280.0070.01025.92
8.1.270.0140.00723.92
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0140.00723.82
8.1.230.0070.00319.16
8.1.220.0060.00317.74
8.1.210.0060.00318.77
8.1.200.0000.00817.22
8.1.190.0000.00817.22
8.1.180.0000.00818.10
8.1.170.0050.00318.49
8.1.160.0080.00021.93
8.1.150.0040.00418.68
8.1.140.0000.00717.46
8.1.130.0030.00317.86
8.1.120.0000.00717.29
8.1.110.0040.00417.42
8.1.100.0000.00717.46
8.1.90.0000.00717.43
8.1.80.0080.00017.37
8.1.70.0000.00717.41
8.1.60.0030.00617.57
8.1.50.0000.00817.53
8.1.40.0050.00317.53
8.1.30.0030.00617.63
8.1.20.0040.00417.59
8.1.10.0000.00717.62
8.1.00.0000.00817.58
8.0.300.0040.00418.77
8.0.290.0030.00317.04
8.0.280.0030.00318.45
8.0.270.0070.00017.30
8.0.260.0000.00718.44
8.0.250.0040.00416.94
8.0.240.0000.00717.02
8.0.230.0030.00516.87
8.0.220.0040.00416.88
8.0.210.0000.00716.90
8.0.200.0030.00316.88
8.0.190.0090.00016.85
8.0.180.0040.00416.77
8.0.170.0000.00816.93
8.0.160.0040.00416.88
8.0.150.0000.00716.85
8.0.140.0000.00716.91
8.0.130.0070.00013.30
8.0.120.0030.00616.75
8.0.110.0050.00316.91
8.0.100.0070.00016.75
8.0.90.0050.00316.94
8.0.80.0130.00916.88
8.0.70.0000.00816.86
8.0.60.0000.00716.91
8.0.50.0000.00716.71
8.0.30.0100.01017.29
8.0.20.0120.00617.40
8.0.10.0040.00416.88
8.0.00.0100.00916.82
7.4.330.0000.00515.15
7.4.320.0030.00316.61
7.4.300.0030.00316.50
7.4.290.0000.00716.43
7.4.280.0070.00016.59
7.4.270.0040.00416.54
7.4.260.0030.00316.51
7.4.250.0000.00716.57
7.4.240.0020.00516.50
7.4.230.0030.00316.41
7.4.220.0170.00716.62
7.4.210.0030.01016.47
7.4.200.0000.00716.70
7.4.160.0090.00616.54
7.4.150.0140.00317.40
7.4.140.0150.00617.86
7.4.130.0070.01016.43
7.4.120.0070.01316.47
7.4.110.0060.01216.34
7.4.100.0140.00316.49
7.4.90.0070.01016.32
7.4.80.0050.01419.39
7.4.70.0060.01216.53
7.4.60.0140.00616.46
7.4.50.0030.00616.35
7.4.40.0110.00716.48
7.4.30.0080.00816.58
7.4.00.0070.00915.08
7.3.330.0020.00213.26
7.3.320.0030.00313.18
7.3.310.0030.00316.20
7.3.300.0030.00316.37
7.3.290.0070.01316.22
7.3.280.0110.00616.29
7.3.270.0100.00717.40
7.3.260.0090.00916.54
7.3.250.0120.00616.32
7.3.240.0130.00516.29
7.3.230.0130.00316.44
7.3.210.0110.00616.43
7.3.200.0090.00919.39
7.3.190.0100.01216.59
7.3.180.0110.00516.63
7.3.170.0030.01316.50
7.3.160.0160.00016.55
7.3.120.0100.00714.66
7.3.110.0000.01714.70
7.3.100.0060.00915.05
7.3.90.0100.00614.94
7.3.80.0060.00914.82
7.3.70.0000.01114.48
7.3.60.0030.00814.70
7.3.50.0030.00614.68
7.3.40.0060.00314.55
7.3.30.0000.01314.84
7.3.20.0070.00716.60
7.3.10.0090.00616.48
7.3.00.0000.00816.64
7.2.330.0140.00316.54
7.2.320.0070.01116.33
7.2.310.0070.01616.63
7.2.300.0060.01016.57
7.2.290.0130.00716.33
7.2.250.0060.01215.31
7.2.240.0070.01315.11
7.2.230.0040.01215.27
7.2.220.0090.00614.67
7.2.210.0130.00014.79
7.2.200.0040.01114.98
7.2.190.0070.00714.83
7.2.180.0030.01015.03
7.2.170.0120.00314.96
7.2.00.0030.01019.49
7.1.330.0100.00315.87
7.1.320.0090.00615.73
7.1.310.0000.00815.41
7.1.300.0040.01115.39
7.1.290.0000.01215.87
7.1.280.0030.00515.71
7.1.270.0040.00815.58
7.1.260.0040.00415.75
7.1.100.0130.00617.88
7.1.70.0070.01017.22
7.1.60.0120.00619.70
7.1.50.0000.02116.52
7.1.00.0000.08022.31
7.0.200.0070.00316.66
7.0.140.0000.07722.00
7.0.60.0030.09019.85
7.0.50.0070.04317.84
7.0.40.0100.08320.22
7.0.30.0470.05720.08
7.0.20.0200.04720.10
7.0.10.0070.07320.10
7.0.00.0130.05020.24
5.6.280.0000.07721.07
5.6.210.0130.07020.45
5.6.200.0100.08018.15
5.6.190.0100.06020.65
5.6.180.3770.04320.61
5.6.170.0330.07020.47
5.6.160.0030.09320.61
5.6.150.0000.07318.28
5.6.140.0070.05718.29
5.6.130.0030.04718.18
5.6.120.0130.05321.00
5.6.110.0130.07721.01
5.6.100.0100.08021.11
5.6.90.0100.06320.88
5.6.80.0100.07320.43
5.6.70.4030.03320.41
5.5.350.0100.02720.46
5.5.340.0100.03318.09
5.5.330.0070.08020.41
5.5.320.0200.05720.32
5.5.310.0300.05720.50
5.5.300.0170.07018.07
5.5.290.0030.05318.04
5.5.280.0000.07020.95
5.5.270.0000.04320.98
5.5.260.0100.08320.85
5.5.250.0030.08320.72
5.5.240.0170.04020.21
5.4.450.0230.05319.48
5.4.440.0270.05719.47
5.4.430.0300.07319.41
5.4.420.0270.07719.41
5.4.410.0330.06719.51
5.4.400.0270.05319.10
5.4.390.0300.07018.95
5.4.380.0370.06719.06
5.4.370.0130.04019.09
5.4.360.0170.04718.86
5.4.350.0200.03318.85
5.4.340.0170.03718.85
5.4.320.0200.03319.09
5.4.310.0130.03719.07
5.4.300.0170.06719.09
5.4.290.0130.04019.07
5.4.280.0230.04018.85
5.4.270.0200.04019.19
5.4.260.0130.04018.96
5.4.250.0170.03718.97
5.4.240.0230.03019.13
5.4.230.0270.02319.07
5.4.220.0230.03019.19
5.4.210.0200.03319.19
5.4.200.0170.03719.03
5.4.190.0170.03718.84
5.4.180.0170.03719.20
5.4.170.0230.04019.07
5.4.160.0070.04319.24
5.4.150.0130.04019.13
5.4.140.0300.04716.37
5.4.130.0270.07016.71
5.4.120.0300.04316.34
5.4.110.0230.07316.63
5.4.100.0270.07316.59
5.4.90.0330.04716.50
5.4.80.0230.07316.48
5.4.70.0330.05016.22
5.4.60.0300.06716.42
5.4.50.0330.06016.25
5.4.40.0230.04016.26
5.4.30.0230.07016.47
5.4.20.0270.06716.42
5.4.10.0300.06316.32
5.4.00.0200.05715.73
5.3.290.0170.03714.91
5.3.280.0170.03714.72
5.3.270.0230.05314.54
5.3.260.0200.03314.60
5.3.250.0270.07014.73
5.3.240.0230.07014.51
5.3.230.0300.06714.68
5.3.220.0330.06014.49
5.3.210.0300.04714.55
5.3.200.0370.06014.65
5.3.190.0400.06014.68
5.3.180.0330.06714.62
5.3.170.0230.06714.45
5.3.160.0300.06714.57
5.3.150.0230.04714.57
5.3.140.0200.04314.50
5.3.130.0300.06714.77
5.3.120.0230.07314.56
5.3.110.0230.03714.56
5.3.100.0230.07014.02
5.3.90.0300.06713.95
5.3.80.0200.04013.93
5.3.70.0300.07014.25
5.3.60.0230.03714.17
5.3.50.0300.07013.93
5.3.40.0300.03714.04
5.3.30.0330.06714.14
5.3.20.0170.05313.68
5.3.10.0230.07313.56
5.3.00.0330.04013.65
5.2.170.0270.05012.33
5.2.160.0230.05312.33
5.2.150.0230.03712.33
5.2.140.0170.04312.33
5.2.130.0230.06012.33
5.2.120.0200.03712.33
5.2.110.0170.05712.33
5.2.100.0200.03712.33
5.2.90.0230.03312.33
5.2.80.0130.03312.33
5.2.70.0200.06012.33
5.2.60.0200.03712.33
5.2.50.0200.06312.33
5.2.40.0130.05312.33
5.2.30.0130.06312.33
5.2.20.0200.04312.33
5.2.10.0170.03012.33
5.2.00.0200.04312.33
5.1.60.0170.02712.33
5.1.50.0170.03012.33
5.1.40.0170.04312.33
5.1.30.0170.02712.33
5.1.20.0130.03712.33
5.1.10.0170.03012.33
5.1.00.0200.04712.33
5.0.50.0070.03012.33
5.0.40.0130.04012.33
5.0.30.0170.05312.33
5.0.20.0200.02712.33
5.0.10.0100.03712.33
5.0.00.0100.04712.33
4.4.90.0100.01312.33
4.4.80.0100.03312.33
4.4.70.0070.02312.33
4.4.60.0070.01712.33
4.4.50.0070.03312.33
4.4.40.0130.02712.33
4.4.30.0100.03712.33
4.4.20.0170.03012.33
4.4.10.0070.03312.33
4.4.00.0070.02712.33
4.3.110.0130.03312.33
4.3.100.0100.03312.33
4.3.90.0130.03012.33
4.3.80.0100.02312.33
4.3.70.0070.02312.33
4.3.60.0130.02712.33
4.3.50.0100.03712.33
4.3.40.0100.04312.33
4.3.30.0030.02312.33
4.3.20.0030.03012.33
4.3.10.0030.02712.33
4.3.00.0030.03012.33

preferences:
44.84 ms | 400 KiB | 5 Q