3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Pessoa { protected $nome; function __call($metodo, $parametros) { $prefixo = substr($metodo, 0, 3); $variavel = substr($metodo, 4); if ($prefixo == 'set') { $this->$variavel = $parametros[0]; } elseif ($prefixo == 'get') { return $this->$variavel; } else { throw new Exception('O método ' . $metodo . ' não existe!'); } } } for ($i=0; $i < 500; $i++) { $teste = new Pessoa(); $teste->setNome('Luis'); }

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.0070.01016.50
8.3.50.0120.00822.05
8.3.40.0070.00718.55
8.3.30.0070.01118.89
8.3.20.0040.01120.21
8.3.10.0080.00023.66
8.3.00.0090.00019.25
8.2.180.0090.00616.38
8.2.170.0000.01522.96
8.2.160.0070.00720.38
8.2.150.0000.00924.18
8.2.140.0060.00324.66
8.2.130.0040.00419.45
8.2.120.0080.00026.35
8.2.110.0030.00719.30
8.2.100.0090.00317.90
8.2.90.0000.00819.36
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0040.00718.04
8.2.50.0000.00818.07
8.2.40.0070.00019.29
8.2.30.0000.00820.69
8.2.20.0040.00417.85
8.2.10.0070.00018.24
8.2.00.0040.00418.06
8.1.280.0080.00825.92
8.1.270.0100.00021.91
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0000.00921.31
8.1.230.0060.00617.42
8.1.220.0000.00917.74
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0000.00817.35
8.1.180.0080.00018.10
8.1.170.0050.00320.14
8.1.160.0000.00721.99
8.1.150.0000.00718.89
8.1.140.0030.00519.60
8.1.130.0040.00417.68
8.1.120.0050.00317.47
8.1.110.0080.00017.44
8.1.100.0030.00517.34
8.1.90.0050.00217.50
8.1.80.0040.00417.44
8.1.70.0030.00317.35
8.1.60.0040.00417.59
8.1.50.0050.00517.55
8.1.40.0040.00717.36
8.1.30.0030.00517.54
8.1.20.0030.00517.58
8.1.10.0000.00817.61
8.1.00.0040.00717.38
8.0.300.0060.00318.77
8.0.290.0050.00216.58
8.0.280.0070.00018.30
8.0.270.0070.00017.24
8.0.260.0030.00317.15
8.0.250.0030.00316.91
8.0.240.0040.00717.01
8.0.230.0030.00316.82
8.0.220.0030.00316.92
8.0.210.0050.00316.77
8.0.200.0030.00316.83
8.0.190.0000.00817.02
8.0.180.0000.00816.79
8.0.170.0030.00616.80
8.0.160.0040.00416.91
8.0.150.0040.00416.80
8.0.140.0040.00416.79
8.0.130.0000.00613.30
8.0.120.0060.00316.82
8.0.110.0040.00416.78
8.0.100.0030.00516.79
8.0.90.0000.00816.75
8.0.80.0060.00916.93
8.0.70.0000.00816.89
8.0.60.0080.00016.73
8.0.50.0050.00316.92
8.0.30.0070.00917.00
8.0.20.0060.01417.40
8.0.10.0040.00416.91
8.0.00.0090.00816.72
7.4.330.0000.00516.83
7.4.320.0000.00716.39
7.4.300.0000.00616.50
7.4.290.0030.00316.64
7.4.280.0040.00416.47
7.4.270.0030.00316.57
7.4.260.0000.00716.48
7.4.250.0040.00416.56
7.4.240.0000.00716.40
7.4.230.0000.00716.47
7.4.220.0120.00616.51
7.4.210.0080.00616.56
7.4.200.0070.00016.34
7.4.160.0040.01216.34
7.4.150.0160.00717.40
7.4.140.0150.00317.86
7.4.130.0070.01116.61
7.4.120.0110.01016.48
7.4.110.0140.00616.32
7.4.100.0070.01016.52
7.4.90.0000.01716.43
7.4.80.0110.00519.39
7.4.70.0070.01116.35
7.4.60.0110.00616.66
7.4.50.0090.00616.48
7.4.40.0060.01116.51
7.4.30.0100.01016.43
7.4.00.0070.01014.81
7.3.330.0000.00513.16
7.3.320.0050.00013.30
7.3.310.0070.00016.13
7.3.300.0040.00416.30
7.3.290.0090.00616.34
7.3.280.0050.01016.33
7.3.270.0100.00717.40
7.3.260.0060.01216.33
7.3.250.0070.01216.50
7.3.240.0060.01316.41
7.3.230.0100.01016.39
7.3.210.0030.01416.34
7.3.200.0080.00816.48
7.3.190.0070.01016.23
7.3.180.0120.00416.48
7.3.170.0080.00816.41
7.3.160.0040.01416.32
7.3.120.0080.01114.85
7.3.110.0050.01014.86
7.3.100.0090.00314.97
7.3.90.0080.00914.60
7.3.80.0070.00415.00
7.3.70.0060.01014.66
7.3.60.0050.00614.77
7.3.50.0080.00614.99
7.3.40.0060.00814.90
7.3.30.0090.00614.86
7.3.20.0080.00816.73
7.3.10.0060.01116.54
7.3.00.0120.00316.70
7.2.330.0030.01616.56
7.2.320.0060.01316.47
7.2.310.0100.01016.51
7.2.300.0120.00916.65
7.2.290.0060.01216.62
7.2.250.0100.00814.98
7.2.240.0060.01615.05
7.2.230.0050.01315.25
7.2.220.0080.00515.24
7.2.210.0030.01015.11
7.2.200.0060.01015.17
7.2.190.0050.01015.04
7.2.180.0060.01015.09
7.2.170.0050.01214.83
7.2.130.0080.01516.71
7.2.120.0110.01416.39
7.2.110.0170.00716.40
7.2.100.0160.00716.56
7.2.90.0140.00316.07
7.2.80.0120.01516.29
7.2.70.0230.01116.70
7.2.60.0160.00317.07
7.2.50.0160.01216.66
7.2.40.0160.01316.61
7.2.30.0210.00516.54
7.2.20.0150.00916.78
7.2.10.0260.00016.54
7.2.00.0170.00918.16
7.1.330.0050.01115.92
7.1.320.0060.00515.84
7.1.310.0050.00815.76
7.1.300.0070.00515.93
7.1.290.0030.00715.82
7.1.280.0040.01115.60
7.1.270.0030.01015.71
7.1.260.0050.00915.69
7.1.250.0160.00615.23
7.1.100.0040.00717.83
7.1.70.0050.00317.34
7.1.60.0060.01519.48
7.1.50.0090.01217.03
7.1.00.0070.07722.42
7.0.200.0110.00714.40
7.0.60.0130.08019.87
7.0.50.0030.07317.88
7.0.40.0130.08320.18
7.0.30.0270.05020.07
7.0.20.0370.06720.12
7.0.10.0030.04320.12
7.0.00.0100.04020.16
5.6.280.0030.06721.11
5.6.210.0170.07020.51
5.6.200.0030.04318.19
5.6.190.0100.06320.40
5.6.180.0200.04320.42
5.6.170.0300.08020.51
5.6.160.0130.08320.57
5.6.150.0100.04718.21
5.6.140.0070.07718.17
5.6.130.0070.07718.11
5.6.120.0100.08720.90
5.6.110.0030.08720.98
5.6.100.0100.07720.96
5.6.90.0030.05321.04
5.6.80.0130.07320.35
5.5.350.0030.03720.47
5.5.340.0070.07317.97
5.5.330.0070.08320.19
5.5.320.0170.04320.32
5.5.310.0230.03320.35
5.5.300.0000.07318.01
5.5.290.0070.05717.99
5.5.280.0100.05020.80
5.5.270.0130.07720.95
5.5.260.0000.05720.79
5.5.250.0070.03720.50
5.5.240.0100.04320.07

preferences:
48.5 ms | 401 KiB | 5 Q