3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { public $prop1 = "I'm a class property!"; public function __construct() { echo 'The class "', __CLASS__, '" was initiated!<br />'; } public function __destruct() { echo 'The class "', __CLASS__, '" was destroyed.<br />'; } public function __toString() { echo "Using the toString method: "; return $this->getProperty(); } public function setProperty($newval) { $this->prop1 = $newval; } public function getProperty() { return $this->prop1 . "<br />"; } } // Create a new object $obj = new MyClass; // Output the object as a string echo $obj->_toString(); // Destroy the object unset($obj); // Output a message at the end of the file echo "End of file.<br />"; ?>

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.00016.50
8.3.50.0100.01022.08
8.3.40.0000.01418.68
8.3.30.0140.00019.09
8.3.20.0040.00420.19
8.3.10.0090.00023.48
8.3.00.0030.00718.92
8.2.180.0070.00718.29
8.2.170.0140.00722.96
8.2.160.0130.00320.35
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0000.00726.16
8.2.120.0040.01122.30
8.2.110.0040.00720.28
8.2.100.0040.00817.89
8.2.90.0040.00419.17
8.2.80.0030.00517.97
8.2.70.0080.00017.63
8.2.60.0040.00718.04
8.2.50.0000.00918.07
8.2.40.0080.00019.91
8.2.30.0070.00318.30
8.2.20.0000.00817.73
8.2.10.0040.00418.13
8.2.00.0000.00917.74
8.1.280.0130.00725.92
8.1.270.0030.00523.96
8.1.260.0060.00326.35
8.1.250.0000.00828.09
8.1.240.0030.00623.96
8.1.230.0110.00017.52
8.1.220.0040.00417.74
8.1.210.0090.00018.77
8.1.200.0000.00817.35
8.1.190.0050.00317.35
8.1.180.0040.00418.10
8.1.170.0050.00318.49
8.1.160.0050.00222.02
8.1.150.0060.00318.75
8.1.140.0030.00517.50
8.1.130.0050.00317.82
8.1.120.0000.00817.39
8.1.110.0040.00417.46
8.1.100.0070.00017.37
8.1.90.0020.00517.53
8.1.80.0030.00417.36
8.1.70.0030.00717.41
8.1.60.0040.00417.47
8.1.50.0080.00017.43
8.1.40.0000.01017.44
8.1.30.0030.00717.62
8.1.20.0040.00417.67
8.1.10.0040.00417.62
8.1.00.0040.00417.38
8.0.300.0080.00018.77
8.0.290.0040.00416.75
8.0.280.0030.00318.32
8.0.270.0000.00817.25
8.0.260.0000.00717.26
8.0.250.0030.00317.02
8.0.240.0000.00816.89
8.0.230.0070.00017.00
8.0.220.0060.00016.85
8.0.210.0070.00016.87
8.0.200.0060.00016.91
8.0.190.0030.00316.90
8.0.180.0040.00416.99
8.0.170.0040.00417.07
8.0.160.0030.00616.83
8.0.150.0040.00416.89
8.0.140.0030.00516.93
8.0.130.0000.00513.36
8.0.120.0030.00616.96
8.0.110.0040.00416.88
8.0.100.0000.00816.84
8.0.90.0040.00416.96
8.0.80.0060.01516.84
8.0.70.0000.00716.83
8.0.60.0040.00416.82
8.0.50.0040.00416.99
8.0.30.0140.00517.11
8.0.20.0070.01217.40
8.0.10.0040.00417.05
8.0.00.0130.00516.69
7.4.330.0050.00015.00
7.4.320.0030.00516.48
7.4.300.0060.00016.50
7.4.290.0030.00316.63
7.4.280.0050.00216.40
7.4.270.0030.00316.53
7.4.260.0030.00316.40
7.4.250.0000.00816.50
7.4.240.0060.00116.47
7.4.230.0040.00416.45
7.4.220.0120.00616.70
7.4.210.0050.01016.59
7.4.200.0080.00016.68
7.4.190.0070.00016.79
7.4.160.0100.00716.30
7.4.150.0060.01117.40
7.4.140.0070.01017.86
7.4.130.0100.00616.42
7.4.120.0110.00616.46
7.4.110.0090.00916.63
7.4.100.0060.01516.62
7.4.90.0090.00916.46
7.4.80.0090.01319.39
7.4.70.0090.01216.59
7.4.60.0090.00916.45
7.4.50.0040.00416.58
7.4.40.0100.01416.47
7.4.30.0160.00016.57
7.4.10.0050.01115.07
7.4.00.0070.01114.99
7.3.330.0060.00013.29
7.3.320.0000.00513.23
7.3.310.0000.00716.47
7.3.300.0000.00616.36
7.3.290.0090.01116.38
7.3.280.0100.01016.42
7.3.270.0120.00617.40
7.3.260.0060.01216.62
7.3.250.0090.00816.52
7.3.240.0180.00416.52
7.3.230.0060.01016.39
7.3.210.0160.00316.38
7.3.200.0040.01519.39
7.3.190.0120.00916.35
7.3.180.0030.01316.41
7.3.170.0100.00516.35
7.3.160.0000.01516.42
7.3.130.0090.00514.84
7.3.120.0100.00714.77
7.3.110.0070.01314.56
7.3.100.0100.00515.00
7.3.90.0020.01214.71
7.3.80.0100.00714.71
7.3.70.0050.00714.68
7.3.60.0060.00914.60
7.3.50.0080.00814.62
7.3.40.0060.00614.51
7.3.30.0070.01114.69
7.3.20.0090.01016.46
7.3.10.0050.00916.35
7.3.00.0020.01116.47
7.2.330.0060.01216.80
7.2.320.0100.01316.54
7.2.310.0130.00316.79
7.2.300.0110.00716.64
7.2.290.0100.00716.68
7.2.260.0070.00714.93
7.2.250.0040.01115.16
7.2.240.0070.00715.11
7.2.230.0040.00714.90
7.2.220.0100.00515.02
7.2.210.0070.01015.12
7.2.200.0060.00814.89
7.2.190.0070.00914.87
7.2.180.0090.00514.83
7.2.170.0080.00514.91
7.2.160.0080.00814.81
7.2.150.0030.01316.73
7.2.140.0050.01316.86
7.2.130.0130.00316.94
7.2.120.0050.01116.72
7.2.110.0060.01116.61
7.2.100.0050.01116.77
7.2.90.0080.00816.87
7.2.80.0030.01416.63
7.2.70.0040.01016.84
7.2.60.0050.00816.75
7.2.50.0060.00616.58
7.2.40.0070.00616.88
7.2.30.0030.01116.76
7.2.20.0080.00816.85
7.2.10.0050.00916.58
7.2.00.0070.00617.73
7.1.330.0020.01315.43
7.1.320.0070.00415.48
7.1.310.0080.00515.55
7.1.300.0050.00815.47
7.1.290.0040.01015.62
7.1.280.0100.00315.64
7.1.270.0100.00715.60
7.1.260.0070.00315.38
7.1.250.0050.01015.54
7.1.240.0020.01115.46
7.1.230.0060.00815.64
7.1.220.0060.00815.40
7.1.210.0090.00515.66
7.1.200.0070.00515.64
7.1.190.0010.01115.52
7.1.180.0060.00715.55
7.1.170.0020.01215.57
7.1.160.0050.00915.61
7.1.150.0040.01115.50
7.1.140.0050.00415.68
7.1.130.0020.00915.38
7.1.120.0100.00415.66
7.1.110.0000.01315.65
7.1.100.0090.00616.27
7.1.90.0030.01015.58
7.1.80.0060.00615.48
7.1.70.0080.00615.82
7.1.60.0060.01016.78
7.1.50.0050.01416.04
7.1.40.0060.01015.49
7.1.30.0070.00415.56
7.1.20.0000.01115.47
7.1.10.0070.00515.36
7.1.00.0030.03217.79
7.0.330.0050.01115.36
7.0.320.0090.00515.18
7.0.310.0030.01115.23
7.0.300.0050.00515.08
7.0.290.0050.00715.16
7.0.280.0030.01015.16
7.0.270.0050.00415.25
7.0.260.0050.00915.12
7.0.250.0030.01115.24
7.0.240.0020.01115.22
7.0.230.0020.01115.20
7.0.220.0040.00815.21
7.0.210.0090.00514.96
7.0.200.0050.00615.71
7.0.190.0040.00915.24
7.0.180.0050.00915.22
7.0.170.0000.01115.36
7.0.160.0060.00914.98
7.0.150.0020.01115.32
7.0.140.0020.03117.52
7.0.130.0040.00915.25
7.0.120.0070.00915.14
7.0.110.0120.00315.32
7.0.100.0050.00815.18
7.0.90.0060.00715.38
7.0.80.0030.01015.39
7.0.70.0050.00915.35
7.0.60.0040.02116.82
7.0.50.0040.02816.18
7.0.40.0040.01915.65
7.0.30.0120.02415.67
7.0.20.0130.02915.58
7.0.10.0090.02015.66
7.0.00.0060.03215.49
5.6.400.0110.00214.34
5.6.390.0080.00614.07
5.6.380.0030.01013.90
5.6.370.0060.00914.15
5.6.360.0050.00714.20
5.6.350.0040.01214.09
5.6.340.0080.00414.21
5.6.330.0080.00214.20
5.6.320.0020.01414.34
5.6.310.0020.01514.21
5.6.300.0050.00914.26
5.6.290.0080.00514.22
5.6.280.0090.02616.40
5.6.270.0100.00714.31
5.6.260.0080.00614.22
5.6.250.0050.01214.36
5.6.240.0080.00314.27
5.6.230.0050.00614.19
5.6.220.0030.00914.33
5.6.210.0090.03016.40
5.6.200.0050.01815.46
5.6.190.0070.03416.38
5.6.180.0070.02216.24
5.6.170.0120.01916.18
5.6.160.0050.02016.20
5.6.150.0050.01815.52
5.6.140.0020.03315.50
5.6.130.0070.01715.62
5.6.120.0070.01816.54
5.6.110.0040.02916.51
5.6.100.0090.03016.31
5.6.90.0090.02716.38
5.6.80.0130.02216.34
5.6.70.0030.01014.26
5.6.60.0100.00413.94
5.6.50.0090.00414.34
5.6.40.0050.00614.05
5.6.30.0090.00614.30
5.6.20.0030.00814.16
5.6.10.0020.01314.09
5.6.00.0070.00514.21
5.5.380.0050.00813.96
5.5.370.0040.00814.35
5.5.360.0050.00713.95
5.5.350.1440.02116.46
5.5.340.0070.03215.46
5.5.330.0060.01716.16
5.5.320.0120.02016.31
5.5.310.0120.02616.21
5.5.300.0090.02415.18
5.5.290.0050.01915.29
5.5.280.0080.03116.35
5.5.270.0040.03716.29
5.5.260.0090.03116.31
5.5.250.0100.02916.30
5.5.240.0030.03116.14
5.5.230.0080.00914.04
5.5.220.0090.00614.13
5.5.210.0060.00413.90
5.5.200.0070.00814.21
5.5.190.0060.00614.30
5.5.180.0050.00714.00
5.5.170.0090.00713.98
5.5.160.0080.01014.04
5.5.150.0060.00714.02
5.5.140.0080.00614.09
5.5.130.0000.01413.89
5.5.120.0050.01014.07
5.5.110.0030.00914.04
5.5.100.0060.01014.02
5.5.90.0020.01014.07
5.5.80.0060.00714.01
5.5.70.0080.00814.08
5.5.60.0020.01213.74
5.5.50.0040.00814.29
5.5.40.0040.01114.03
5.5.30.0040.01014.24
5.5.20.0080.00614.11
5.5.10.0110.00414.20
5.5.00.0030.01014.23
5.4.450.0130.02513.88
5.4.440.0120.02214.00
5.4.430.0120.01914.05
5.4.420.0110.02214.03
5.4.410.0100.02813.84
5.4.400.0070.02213.89
5.4.390.0080.02613.76
5.4.380.0060.02513.69
5.4.370.0050.02413.74
5.4.360.0140.01613.68
5.4.350.0090.01813.77
5.4.340.0090.01913.78
5.4.330.0040.00311.20
5.4.320.0040.02011.60
5.4.310.0040.02011.61
5.4.300.0030.01711.69
5.4.290.0050.02411.65
5.4.280.0100.02111.59
5.4.270.0080.02311.66
5.4.260.0070.02211.72
5.4.250.0060.01811.67
5.4.240.0050.02111.57
5.4.230.0060.01411.63
5.4.220.0050.01711.65
5.4.210.0050.01411.63
5.4.200.0060.01511.61
5.4.190.0020.02111.68
5.4.180.0060.01511.65
5.4.170.0060.01711.73
5.4.160.0030.02011.62
5.4.150.0020.01911.55
5.4.140.0050.01811.48
5.4.130.0080.01311.54
5.4.120.0070.01411.47
5.4.110.0090.01411.58
5.4.100.0080.01611.57
5.4.90.0060.02011.54
5.4.80.0060.02611.42
5.4.70.0070.02111.53
5.4.60.0070.01811.53
5.4.50.0050.01811.47
5.4.40.0080.01411.54
5.4.30.0100.04311.45
5.4.20.0120.03511.56
5.4.10.0120.02511.59
5.4.00.0070.02811.38
5.3.290.0070.01911.70
5.3.280.0110.02911.69
5.3.270.0070.02411.66
5.3.260.0070.01611.71
5.3.250.0090.02411.67
5.3.240.0160.02611.66
5.3.230.0080.04111.65
5.3.220.0090.03011.64
5.3.210.0070.02711.64
5.3.200.0080.04111.64
5.3.190.0080.02511.64
5.3.180.0130.03011.67
5.3.170.0100.03411.64
5.3.160.0120.03211.69
5.3.150.0090.02711.69
5.3.140.0090.03611.63
5.3.130.0080.02411.63
5.3.120.0110.02711.63
5.3.110.0110.03711.66
5.3.100.0080.04311.46
5.3.90.0070.03711.45
5.3.80.0060.02311.45
5.3.70.0080.02711.45
5.3.60.0140.02911.44
5.3.50.0080.02611.43
5.3.40.0040.02211.43
5.3.30.0110.02811.41
5.3.20.0120.02511.34
5.3.10.0080.02711.33
5.3.00.0110.03811.32
5.2.170.0230.0619.23
5.2.160.0120.0419.23
5.2.150.0090.0329.23
5.2.140.0060.0329.23
5.2.130.0120.0409.19
5.2.120.0130.0619.19
5.2.110.0120.0469.20
5.2.100.0090.0369.18
5.2.90.0100.0559.19
5.2.80.0060.0589.19
5.2.70.0070.0459.18
5.2.60.0160.0809.13
5.2.50.0240.0599.10
5.2.40.0100.0429.08
5.2.30.0130.0599.06
5.2.20.0120.0629.04
5.2.10.0130.0358.95
5.2.00.0030.0478.82
5.1.60.0050.0298.09
5.1.50.0080.0398.09
5.1.40.0070.0398.07
5.1.30.0090.0378.43
5.1.20.0070.0558.45
5.1.10.0110.0578.17
5.1.00.0090.0538.17
5.0.50.0110.0346.65
5.0.40.0090.0396.52
5.0.30.0080.0646.32
5.0.20.0220.0586.29
5.0.10.0170.0476.27
5.0.00.0090.0386.26
4.4.90.0130.0274.78
4.4.80.0150.0224.76
4.4.70.0090.0354.76
4.4.60.0120.0664.75
4.4.50.0070.0284.77
4.4.40.0090.0394.71
4.4.30.0150.0364.76
4.4.20.0030.0294.84
4.4.10.0120.0334.85
4.4.00.0080.0504.76
4.3.110.0060.0494.67
4.3.100.0140.0444.67
4.3.90.0100.0464.63
4.3.80.0070.0354.58
4.3.70.0050.0334.63
4.3.60.0070.0214.63
4.3.50.0070.0384.62
4.3.40.0060.0334.54
4.3.30.0040.0823.30
4.3.20.0040.0433.28
4.3.10.0040.0233.24
4.3.00.0070.0207.09

preferences:
62.99 ms | 400 KiB | 5 Q