3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Crear variable $Ryan y asignarle como valor la clase Usuario $Ryan = new Usuario(); // Ahora la variable Ryan es una clase, con variables $nombre y $edad $Ryan->AsignarNombre("Ryan"); $Ryan->AsignarEdad(19); // Crear variable $Ismael y asignarle como valor la clase Usuario $Ismael = new Usuario(); // Ahora la variable Ismael es una clase, con variables $nombre y $edad $Ismael->AsignarNombre("Ismael"); $Ryan->AsignarEdad(21); // Mostrar informacion de ryan $Ryan->MostrarDatos(); // Mostrar informacion de Ismael $Ismael->MostrarDatos(); Class Usuario{ public $nombre; public $edad; function AsignardNombre($nombre){ $this->nombre = $nombre; } function AsignardEdad($edad){ $this->edad = $edad; } function MostrarDatos(){ echo $this->nombre.' tiene '.$this->$edad.'\n'; } } ?>

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.40.0110.00818.80
8.3.30.0110.00418.84
8.3.20.0050.00220.16
8.3.10.0090.00023.70
8.3.00.0050.00223.60
8.2.170.0110.00422.96
8.2.160.0100.00322.08
8.2.150.0070.00324.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0060.00317.75
8.2.110.0070.00321.11
8.2.100.0040.00717.25
8.2.90.0000.00718.99
8.2.80.0050.00317.97
8.2.70.0030.00617.63
8.2.60.0030.00617.88
8.2.50.0000.00818.07
8.2.40.0030.00621.07
8.2.30.0040.00419.67
8.2.20.0050.00317.69
8.2.10.0070.00018.05
8.2.00.0000.00718.05
8.1.270.0050.00320.20
8.1.260.0070.00026.35
8.1.250.0070.00728.09
8.1.240.0060.00322.14
8.1.230.0110.00017.64
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0060.00317.25
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0000.00818.58
8.1.160.0050.00323.72
8.1.150.0070.00018.86
8.1.140.0000.00717.38
8.1.130.0070.00017.59
8.1.120.0030.00517.38
8.1.110.0040.00417.41
8.1.100.0050.00217.33
8.1.90.0040.00417.24
8.1.80.0050.00317.42
8.1.70.0000.00717.38
8.1.60.0040.00417.51
8.1.50.0060.00317.40
8.1.40.0060.00317.47
8.1.30.0030.00517.48
8.1.20.0000.00817.64
8.1.10.0000.00717.56
8.1.00.0040.00417.39
8.0.300.0050.00218.77
8.0.290.0060.00316.63
8.0.280.0000.00718.34
8.0.270.0070.00017.07
8.0.260.0030.00517.10
8.0.250.0000.00716.94
8.0.240.0030.00317.02
8.0.230.0050.00316.93
8.0.220.0030.00616.91
8.0.210.0040.00416.92
8.0.200.0040.00416.90
8.0.190.0040.00417.02
8.0.180.0040.00416.95
8.0.170.0000.00816.98
8.0.160.0000.00716.93
8.0.150.0070.00016.80
8.0.140.0030.00316.91
8.0.130.0000.00813.29
8.0.120.0040.00416.88
8.0.110.0000.00716.83
8.0.100.0040.00416.88
8.0.90.0080.00016.91
8.0.80.0100.00616.94
8.0.70.0050.00316.95
8.0.60.0050.00316.88
8.0.50.0080.00016.99
8.0.30.0130.00617.16
8.0.20.0100.00817.40
8.0.10.0040.00417.04
8.0.00.0080.00916.87
7.4.330.0050.00015.08
7.4.320.0000.00616.58
7.4.300.0030.00316.65
7.4.290.0000.00916.36
7.4.280.0000.00816.43
7.4.270.0030.00316.60
7.4.260.0050.00316.48
7.4.250.0040.00416.47
7.4.240.0020.00516.55
7.4.230.0070.00016.51
7.4.220.0100.01716.50
7.4.210.0110.00416.69
7.4.200.0030.00416.50
7.4.160.0230.00316.47
7.4.150.0100.00717.40
7.4.140.0110.01117.86
7.4.130.0080.01016.45
7.4.120.0080.01016.47
7.4.110.0070.01116.71
7.4.100.0150.00916.50
7.4.90.0100.01316.34
7.4.80.0070.01019.39
7.4.70.0070.01116.61
7.4.60.0100.00616.51
7.4.50.0040.00016.27
7.4.40.0130.00316.43
7.4.30.0100.01016.50
7.4.00.0060.00914.91
7.3.330.0020.00213.29
7.3.320.0000.00513.31
7.3.310.0000.00716.33
7.3.300.0030.00316.25
7.3.290.0070.00916.27
7.3.280.0060.01216.31
7.3.270.0140.00317.40
7.3.260.0110.00916.64
7.3.250.0090.00716.37
7.3.240.0100.00716.37
7.3.230.0030.01416.45
7.3.210.0120.00616.52
7.3.200.0130.00316.59
7.3.190.0100.00616.55
7.3.180.0030.01316.48
7.3.170.0100.01016.42
7.3.160.0000.02216.32
7.3.10.0100.00316.58
7.3.00.0090.00316.66
7.2.330.0110.00516.61
7.2.320.0170.00016.59
7.2.310.0130.00916.70
7.2.300.0170.00416.83
7.2.290.0110.00516.61
7.2.130.0070.00716.51
7.2.120.0070.00716.85
7.2.110.0070.00716.72
7.2.100.0000.00916.91
7.2.90.0100.00316.90
7.2.80.0040.01116.47
7.2.70.0040.00716.91
7.2.60.0060.01016.74
7.2.50.0070.00716.98
7.2.40.0030.00916.89
7.2.30.0040.00816.86
7.2.20.0030.00916.84
7.2.10.0000.00916.82
7.2.00.0060.00618.13
7.1.250.0000.00715.57
7.1.200.0060.00315.69
7.1.100.0090.00317.50
7.1.70.0000.00916.80
7.1.60.0040.01119.12
7.1.50.0000.01816.95
7.1.00.0030.07722.40
7.0.200.0030.00616.61
7.0.110.0600.03720.07
7.0.100.0700.05719.95
7.0.90.0770.07720.09
7.0.80.0530.05320.05
7.0.70.0500.08019.91
7.0.60.0630.08320.08
7.0.50.0400.07319.95
7.0.40.0130.07019.65
7.0.30.0130.07019.89
7.0.20.0000.08719.73
7.0.10.0100.07319.84
7.0.00.0030.04319.58
5.6.280.0070.04721.13
5.6.260.0130.08020.71
5.6.250.0230.07020.59
5.6.240.0070.08320.57
5.6.230.0030.08020.63
5.6.220.0070.08020.71
5.6.210.0070.07720.82
5.6.200.0070.08320.67
5.6.190.0130.08020.65
5.6.180.0100.04020.66
5.6.170.0000.06720.63
5.6.160.0130.03020.57
5.6.150.0070.06720.63
5.6.140.0070.05020.56
5.6.130.0070.06020.68
5.6.120.0000.04020.86
5.6.110.0070.07320.61
5.6.100.0070.08020.61
5.6.90.0070.03720.57
5.6.80.0070.07320.04
5.6.70.0100.07719.95
5.6.60.0000.07020.07
5.6.50.0100.06719.95
5.6.40.0130.07019.99
5.6.30.0000.08319.92
5.6.20.0130.05019.96
5.6.10.0130.06020.07
5.6.00.0030.05019.97
5.5.380.0070.08317.64
5.5.370.0070.04317.70
5.5.360.0030.08317.69
5.5.350.0000.08317.68
5.5.340.0070.07717.93
5.5.330.0030.05017.96
5.5.320.0030.04018.08
5.5.310.0030.05017.93
5.5.300.0000.05018.10
5.5.290.0030.06717.93
5.5.280.0030.04718.26
5.5.270.0030.06017.92
5.5.260.0070.08717.92
5.5.250.0100.08317.71
5.5.240.0170.06017.52
5.5.230.0100.07017.34
5.5.220.0000.07717.47
5.5.210.0100.07717.31
5.5.200.0100.07317.45
5.5.190.0070.05017.58
5.5.180.0130.07717.48
5.5.160.0030.07017.45
5.5.150.0070.04317.46
5.5.140.0030.03717.28
5.5.130.0070.07717.27
5.5.120.0030.04017.26
5.5.110.0030.05717.27
5.5.100.0070.03717.21
5.5.90.0000.04017.16
5.5.80.0030.07717.34
5.5.70.0070.05717.46
5.5.60.0100.06717.15
5.5.50.0070.06017.34
5.5.40.0000.04717.34
5.5.30.0170.05317.32
5.5.20.0070.07317.49
5.5.10.0100.05317.37
5.5.00.0030.08317.33
5.4.450.0070.04019.64
5.4.440.0100.03019.57
5.4.430.0070.03319.57
5.4.420.0100.03319.33
5.4.410.0030.05719.42
5.4.400.0100.07319.14
5.4.390.0130.07019.01
5.4.380.0030.08319.11
5.4.370.0100.04319.31
5.4.360.0130.06319.24
5.4.350.0000.05019.18
5.4.340.0130.05719.02
5.4.320.0100.04319.23
5.4.310.0000.05719.34
5.4.300.0000.07719.16
5.4.290.0070.07019.00
5.4.280.0030.06318.99
5.4.270.0030.03719.16
5.4.260.0000.05719.21
5.4.250.0000.04019.00
5.4.240.0000.07719.04
5.4.230.0000.07719.01
5.4.220.0000.05018.98
5.4.210.0200.03719.00
5.4.200.0070.06718.99
5.4.190.0000.08318.96
5.4.180.0000.05019.32
5.4.170.0030.04718.94
5.4.160.0100.07019.29
5.4.150.0030.07319.07
5.4.140.0070.07016.35
5.4.130.0070.06316.59
5.4.120.0070.03316.46
5.4.110.0070.03316.33
5.4.100.0070.03316.31
5.4.90.0070.03316.27
5.4.80.0000.03716.25
5.4.70.0070.03316.25
5.4.60.0100.03016.39
5.4.50.0100.03016.47
5.4.40.0070.03316.49
5.4.30.0030.05316.40
5.4.20.0030.06316.43
5.4.10.0030.03716.40
5.4.00.0100.03015.80
5.3.290.0030.07014.67
5.3.280.0100.07014.69
5.3.270.0000.07714.60
5.3.260.0130.07314.61
5.3.250.0100.07014.63
5.3.240.0070.09014.70
5.3.230.0000.04714.61
5.3.220.0070.03314.70
5.3.210.0100.03314.59
5.3.200.0100.03314.73
5.3.190.0100.03314.61
5.3.180.0000.04014.69
5.3.170.0100.03014.61
5.3.160.0000.04014.70
5.3.150.0030.03714.58
5.3.140.0070.03314.69
5.3.130.0000.04314.68
5.3.120.0100.05314.78
5.3.110.0000.04014.56
5.3.100.0030.04014.17
5.3.90.0100.03014.16
5.3.80.0070.03314.05
5.3.70.0070.07314.02
5.3.60.0030.06314.10
5.3.50.0070.03013.97
5.3.40.0000.03714.04
5.3.30.0070.03013.93
5.3.20.0030.03313.71
5.3.10.0030.03713.89
5.3.00.0030.03713.70
5.2.170.0030.03012.33
5.2.160.0000.03012.33
5.2.150.0000.06012.33
5.2.140.0070.02712.33
5.2.130.0130.04712.33
5.2.120.0070.02712.33
5.2.110.0000.02712.33
5.2.100.0000.03012.33
5.2.90.0030.04312.33
5.2.80.0000.03012.33
5.2.70.0000.03012.33
5.2.60.0000.03012.33
5.2.50.0000.03012.33
5.2.40.0030.02712.33
5.2.30.0000.03012.33
5.2.20.0030.02712.33
5.2.10.0070.04712.33
5.2.00.0030.03012.33
5.1.60.0030.02312.33
5.1.50.0070.02012.33
5.1.40.0070.01712.33
5.1.30.0000.02712.33
5.1.20.0000.02712.33
5.1.10.0030.02712.33
5.1.00.0030.05712.33
5.0.50.0000.02012.33
5.0.40.0030.02012.33
5.0.30.0000.03312.33
5.0.20.0000.02012.33
5.0.10.0000.03712.33
5.0.00.0000.03312.33
4.4.90.0070.01012.33
4.4.80.0030.01312.33
4.4.70.0030.01312.33
4.4.60.0000.01712.33
4.4.50.0030.01312.33
4.4.40.0030.02312.33
4.4.30.0030.01312.33
4.4.20.0000.01712.33
4.4.10.0000.02712.33
4.4.00.0000.02712.33
4.3.110.0030.01012.33
4.3.100.0000.01712.33
4.3.90.0000.01312.33
4.3.80.0030.02312.33
4.3.70.0030.01312.33
4.3.60.0000.01312.33
4.3.50.0000.01712.33
4.3.40.0000.02312.33
4.3.30.0000.01712.33
4.3.20.0000.01712.33
4.3.10.0000.03012.33
4.3.00.0000.01312.33

preferences:
53.55 ms | 400 KiB | 5 Q