3v4l.org

run code in 300+ PHP versions simultaneously
<?php class person { var $name; // variable inside class = property function __construct($persons_name=null) { $this->name = $persons_name; } function set_name($new_name) { $this->name = $new_name; } function get_name() { // function inside class = method return $this->name; } } // Create object WITHOUT constructor by calling a method $SecurityEngineer = new person(); $SecurityEngineer->set_name("Debbie B"); echo "<br>Debbie's full name: " . $SecurityEngineer->get_name()."<br>"; // Create object WITH a constructor $WanEngineer = new person("Lisa L"); echo "Lisa's full name: " . $WanEngineer->get_name();

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.0030.01218.67
8.3.30.0100.00319.22
8.3.20.0000.00820.34
8.3.10.0040.00420.57
8.3.00.0030.00519.26
8.2.170.0150.00622.96
8.2.160.0100.00320.43
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0120.00018.90
8.2.110.0040.00820.52
8.2.100.0090.00317.91
8.2.90.0000.00819.13
8.2.80.0080.00017.97
8.2.70.0090.00017.49
8.2.60.0030.00618.16
8.2.50.0030.00518.10
8.2.40.0020.00520.38
8.2.30.0040.00419.45
8.2.20.0000.00717.73
8.2.10.0040.00417.94
8.2.00.0060.00317.73
8.1.270.0000.00822.18
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0070.00323.84
8.1.230.0060.00622.16
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0030.00617.47
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0030.00618.58
8.1.160.0030.00318.95
8.1.150.0040.00418.91
8.1.140.0030.00517.46
8.1.130.0000.00817.71
8.1.120.0040.00417.46
8.1.110.0040.00317.51
8.1.100.0000.00717.51
8.1.90.0000.00717.55
8.1.80.0040.00417.38
8.1.70.0040.00417.37
8.1.60.0060.00317.49
8.1.50.0050.00317.55
8.1.40.0080.00017.56
8.1.30.0040.00417.67
8.1.20.0040.00417.69
8.1.10.0030.00617.57
8.1.00.0000.00817.42
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0030.00318.39
8.0.270.0080.00017.31
8.0.260.0030.00317.14
8.0.250.0030.00316.92
8.0.240.0040.00417.01
8.0.230.0000.00716.83
8.0.220.0040.00416.93
8.0.210.0070.00016.95
8.0.200.0000.00716.97
8.0.190.0050.00316.90
8.0.180.0040.00416.93
8.0.170.0000.00716.95
8.0.160.0000.00716.93
8.0.150.0040.00416.83
8.0.140.0000.00716.92
8.0.130.0030.00313.36
8.0.120.0000.00716.76
8.0.110.0040.00416.81
8.0.100.0050.00216.95
8.0.90.0000.00716.83
8.0.80.0030.01416.96
8.0.70.0040.00416.90
8.0.60.0040.00416.75
8.0.50.0000.00716.72
8.0.30.0130.00917.06
8.0.20.0130.00717.40
8.0.10.0050.00316.91
8.0.00.0120.00516.77
7.4.330.0000.00715.00
7.4.320.0000.00616.36
7.4.300.0030.00316.48
7.4.290.0070.00016.50
7.4.280.0060.00316.46
7.4.270.0000.00716.52
7.4.260.0060.00016.51
7.4.250.0040.00516.43
7.4.240.0030.00416.54
7.4.230.0040.00416.71
7.4.220.0100.00716.62
7.4.210.0030.01116.54
7.4.200.0070.00016.61
7.4.160.0050.01116.32
7.4.150.0090.01017.40
7.4.140.0090.00917.86
7.4.130.0100.00916.52
7.4.120.0110.00516.47
7.4.110.0150.00316.55
7.4.100.0060.01216.59
7.4.90.0050.01416.52
7.4.80.0020.00416.32
7.4.70.0100.00616.42
7.4.60.0070.01016.34
7.4.50.0050.00316.40
7.4.40.0200.00316.39
7.4.30.0070.01016.73
7.4.00.0070.00914.95
7.3.330.0030.00313.16
7.3.320.0030.00313.25
7.3.310.0000.00716.16
7.3.300.0030.00316.19
7.3.290.0030.01716.30
7.3.280.0050.00916.29
7.3.270.0030.01317.40
7.3.260.0100.00716.46
7.3.250.0080.01216.33
7.3.240.0110.01116.57
7.3.230.0120.00416.54
7.3.210.0150.00616.49
7.3.200.0060.01219.39
7.3.190.0060.01316.30
7.3.180.0140.00316.29
7.3.170.0190.00316.53
7.3.160.0130.00416.53
7.3.120.0110.00715.05
7.3.110.0100.00314.72
7.3.100.0090.00914.53
7.3.90.0030.01015.04
7.3.80.0030.01014.91
7.3.70.0030.00614.80
7.3.60.0030.01014.91
7.3.50.0040.01115.01
7.3.40.0130.00014.56
7.3.30.0060.00914.92
7.3.20.0030.00616.43
7.3.10.0040.00416.52
7.3.00.0110.00716.36
7.2.330.0060.01516.53
7.2.320.0100.00716.62
7.2.310.0120.00916.46
7.2.300.0160.00616.39
7.2.290.0160.00616.50
7.2.250.0100.00715.04
7.2.240.0070.01115.09
7.2.230.0030.01314.61
7.2.220.0060.01015.05
7.2.210.0060.00614.74
7.2.200.0030.01014.91
7.2.190.0090.00614.67
7.2.180.0070.00414.97
7.2.170.0030.00814.95
7.2.160.0060.00315.05
7.2.150.0060.00616.59
7.2.140.0030.01017.13
7.2.130.0030.01116.83
7.2.120.0080.00416.83
7.2.110.0090.00616.73
7.2.100.0060.00916.63
7.2.90.0040.01117.05
7.2.80.0060.00617.20
7.2.70.0030.01216.91
7.2.60.0000.01617.16
7.2.50.0100.00316.92
7.2.40.0070.00717.04
7.2.30.0130.00317.17
7.2.20.0090.00616.96
7.2.10.0060.00316.64
7.2.00.0040.00818.25
7.1.330.0100.00615.50
7.1.320.0000.01315.75
7.1.310.0100.00315.76
7.1.300.0030.00615.82
7.1.290.0090.00315.62
7.1.280.0040.00815.68
7.1.270.0030.00715.70
7.1.260.0140.00015.71
7.1.250.0110.00715.98
7.1.240.0000.01415.74
7.1.230.0030.00715.69
7.1.220.0060.00315.70
7.1.210.0100.00615.55
7.1.200.0060.00315.66
7.1.190.0080.00415.42
7.1.180.0070.00715.79
7.1.170.0070.00715.87
7.1.160.0030.00615.58
7.1.150.0080.00415.86
7.1.140.0070.00715.85
7.1.130.0030.00615.62
7.1.120.0040.00415.72
7.1.110.0040.00815.57
7.1.100.0040.00816.96
7.1.90.0100.00715.98
7.1.80.0030.01315.57
7.1.70.0050.00516.32
7.1.60.0050.01517.45
7.1.50.0120.00316.28
7.1.40.0100.00015.63
7.1.30.0000.01115.81
7.1.20.0070.00715.75
7.1.10.0060.00615.66
7.1.00.0000.04719.05
7.0.330.0030.00515.32
7.0.320.0080.00415.50
7.0.310.0030.01115.45
7.0.300.0050.00515.45
7.0.290.0100.00615.53
7.0.280.0120.00315.43
7.0.270.0040.00815.43
7.0.260.0040.00715.28
7.0.250.0000.01015.50
7.0.240.0070.01015.33
7.0.230.0100.00615.43
7.0.220.0030.01015.21
7.0.210.0070.00715.21
7.0.200.0050.00416.15
7.0.190.0080.00815.30
7.0.180.0060.01015.52
7.0.170.0110.00315.53
7.0.160.0060.00615.21
7.0.150.0130.00015.21
7.0.140.0050.03818.85
7.0.130.0100.00315.37
7.0.120.0030.00615.51
7.0.110.0070.00315.48
7.0.100.0030.00615.25
7.0.90.0040.01115.18
7.0.80.0030.00915.48
7.0.70.0060.00615.61
7.0.60.0100.04017.54
7.0.50.0070.04216.64
7.0.40.0050.03516.92
7.0.30.0240.03816.76
7.0.20.0140.02416.80
7.0.10.0050.04016.85
7.0.00.0080.02516.90
5.6.400.0040.00814.40
5.6.390.0070.00314.48
5.6.380.0000.01014.55
5.6.370.0090.00614.38
5.6.360.0060.00614.38
5.6.350.0090.00614.57
5.6.340.0060.00914.66
5.6.330.0040.00414.51
5.6.320.0100.00614.37
5.6.310.0090.00014.11
5.6.300.0030.00914.55
5.6.290.0030.01014.57
5.6.280.0050.04017.45
5.6.270.0050.00314.37
5.6.260.0000.00814.18
5.6.250.0090.00314.30
5.6.240.0060.00614.41
5.6.230.0040.00414.55
5.6.220.0030.00714.52
5.6.210.0120.04217.47
5.6.200.0080.02516.36
5.6.190.0050.05017.37
5.6.180.0140.02317.56
5.6.170.0100.03917.51
5.6.160.0030.03817.34
5.6.150.0070.04316.43
5.6.140.0080.02316.31
5.6.130.0020.05016.20
5.6.120.0080.02517.80
5.6.110.0080.03817.69
5.6.100.0080.03817.75
5.6.90.0050.05017.74
5.6.80.0100.04217.33
5.6.70.1990.02017.34
5.6.60.0070.00414.45
5.6.50.0060.00914.24
5.6.40.0060.00614.25
5.6.30.0070.00714.18
5.6.20.0070.00714.27
5.6.10.0090.00614.53
5.6.00.0030.00814.21
5.5.380.0030.01014.27
5.5.370.0000.00914.33
5.5.360.0030.01014.16
5.5.350.0160.04317.22
5.5.340.0070.03216.06
5.5.330.0030.02817.21
5.5.320.0230.02317.38
5.5.310.0150.04317.42
5.5.300.0030.04716.27
5.5.290.0030.02616.32
5.5.280.0090.04517.61
5.5.270.0050.03617.76
5.5.260.0130.03517.52
5.5.250.0100.02517.52
5.5.240.0260.03017.23
5.5.230.0070.00713.89
5.5.220.0090.00614.43
5.5.210.0000.01514.26
5.5.200.0050.00514.43
5.5.190.0000.01214.31
5.5.180.0070.01014.29
5.5.170.0040.00414.22
5.5.160.0070.00714.30
5.5.150.0060.00314.50
5.5.140.0040.00914.37
5.5.130.0100.00313.83
5.5.120.0040.00814.16
5.5.110.0110.00314.10
5.5.100.0030.01013.87
5.5.90.0030.01014.22
5.5.80.0060.01014.08
5.5.70.0100.00314.31
5.5.60.0110.00014.17
5.5.50.0060.00714.39
5.5.40.0050.00514.11
5.5.30.0030.00514.09
5.5.20.0030.01014.54
5.5.10.0080.00014.41
5.5.00.0090.00414.26
5.4.450.0100.02715.82
5.4.440.0260.02215.85
5.4.430.0250.02515.81
5.4.420.0260.02515.80
5.4.410.0230.02215.80
5.4.400.0130.02215.80
5.4.390.0200.02715.80
5.4.380.0180.02815.43
5.4.370.0200.02615.36
5.4.360.0180.03115.38
5.4.350.0180.02515.48
5.4.340.0200.02715.47
5.4.330.0060.00612.16
5.4.320.0040.02012.33
5.4.310.0060.02012.33
5.4.300.0070.01912.33
5.4.290.0040.02312.33
5.4.280.0050.02212.28
5.4.270.0060.02012.28
5.4.260.0060.02012.28
5.4.250.0050.02712.28
5.4.240.0050.02212.28
5.4.230.0050.02312.27
5.4.220.0060.01912.28
5.4.210.0070.01812.27
5.4.200.0050.02212.27
5.4.190.0060.02012.27
5.4.180.0020.02312.27
5.4.170.0020.02512.28
5.4.160.0060.02212.27
5.4.150.0040.02512.28
5.4.140.0070.02412.12
5.4.130.0050.02612.11
5.4.120.0040.02012.09
5.4.110.0060.02112.09
5.4.100.0060.01812.09
5.4.90.0070.02212.09
5.4.80.0070.01912.08
5.4.70.0060.02012.08
5.4.60.0060.01912.08
5.4.50.0050.02112.08
5.4.40.0070.01812.08
5.4.30.0080.01812.07
5.4.20.0070.02212.07
5.4.10.0040.02112.08
5.4.00.0070.02011.82
5.3.290.0030.04212.80
5.3.280.0040.04012.71
5.3.270.0060.03912.73
5.3.260.0070.03712.72
5.3.250.0040.03912.72
5.3.240.0050.03812.72
5.3.230.0090.03412.71
5.3.220.0040.03812.68
5.3.210.0060.03912.68
5.3.200.0090.04012.68
5.3.190.0050.03912.68
5.3.180.0070.03612.67
5.3.170.0080.03512.67
5.3.160.0050.03812.68
5.3.150.0030.04212.67
5.3.140.0070.03512.66
5.3.130.0050.04012.66
5.3.120.0080.04012.66
5.3.110.0060.04112.66
5.3.100.0090.04012.12
5.3.90.0050.03812.10
5.3.80.0040.05212.09
5.3.70.0060.03712.09
5.3.60.0050.03912.08
5.3.50.0040.03812.03
5.3.40.0080.03412.03
5.3.30.0050.03511.99
5.3.20.0040.03711.77
5.3.10.0060.03511.73
5.3.00.0060.03711.71
5.2.170.0030.0329.22
5.2.160.0030.0329.22
5.2.150.0040.0319.23
5.2.140.0050.0319.22
5.2.130.0040.0309.18
5.2.120.0030.0319.18
5.2.110.0030.0309.19
5.2.100.0040.0299.19
5.2.90.0050.0299.19
5.2.80.0040.0319.18
5.2.70.0060.0309.18
5.2.60.0050.0309.13
5.2.50.0050.0309.10
5.2.40.0050.0299.08
5.2.30.0040.0319.05
5.2.20.0060.0289.04
5.2.10.0050.0288.95
5.2.00.0020.0328.81
5.1.60.0080.0208.09
5.1.50.0020.0278.09
5.1.40.0050.0248.07
5.1.30.0060.0248.42
5.1.20.0080.0248.45
5.1.10.0020.0298.17
5.1.00.0060.0248.17
5.0.50.0050.0196.65
5.0.40.0040.0246.51
5.0.30.0020.0336.32
5.0.20.0030.0216.29
5.0.10.0060.0226.27
5.0.00.0050.0316.26
4.4.90.0020.0164.77
4.4.80.0030.0154.76
4.4.70.0040.0154.76
4.4.60.0040.0154.75
4.4.50.0020.0164.77
4.4.40.0030.0254.71
4.4.30.0050.0134.76
4.4.20.0020.0164.85
4.4.10.0030.0154.85
4.4.00.0020.0264.76
4.3.110.0050.0154.67
4.3.100.0050.0194.66
4.3.90.0050.0204.64
4.3.80.0040.0254.58
4.3.70.0040.0134.63
4.3.60.0030.0144.63
4.3.50.0020.0164.63
4.3.40.0030.0244.54
4.3.30.0030.0153.31
4.3.20.0040.0143.29
4.3.10.0030.0153.24
4.3.00.0000.02019.45

preferences:
46.35 ms | 400 KiB | 5 Q