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 setProperty($newval) { $this->prop1 = $newval; } public function getProperty() { return $this->prop1 . "<br />"; } } // Create a new object $obj = new MyClass; // Get the value of $prop1 echo $obj->getProperty(); // 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.0120.00616.50
8.3.50.0120.00721.28
8.3.40.0070.01018.75
8.3.30.0160.00318.66
8.3.20.0040.01120.46
8.3.10.0080.00023.65
8.3.00.0040.00423.53
8.2.180.0090.00616.63
8.2.170.0120.00322.96
8.2.160.0030.01020.43
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00420.92
8.2.120.0040.00426.35
8.2.110.0030.00622.25
8.2.100.0110.00417.78
8.2.90.0090.00019.09
8.2.80.0000.00917.97
8.2.70.0030.00617.50
8.2.60.0060.00318.04
8.2.50.0030.00618.07
8.2.40.0000.00722.33
8.2.30.0000.00820.54
8.2.20.0000.00717.56
8.2.10.0070.00317.91
8.2.00.0000.00818.10
8.1.280.0170.00325.92
8.1.270.0070.00423.92
8.1.260.0070.00028.09
8.1.250.0070.00028.09
8.1.240.0030.00723.80
8.1.230.0040.00720.94
8.1.220.0030.00517.76
8.1.210.0080.00018.77
8.1.200.0100.00017.35
8.1.190.0000.00817.22
8.1.180.0080.00018.10
8.1.170.0030.00518.59
8.1.160.0000.00720.61
8.1.150.0040.00418.77
8.1.140.0030.00519.57
8.1.130.0040.00417.66
8.1.120.0030.00317.52
8.1.110.0070.00017.42
8.1.100.0040.00417.36
8.1.90.0020.00517.43
8.1.80.0060.00317.38
8.1.70.0030.00317.43
8.1.60.0000.01017.65
8.1.50.0040.00417.41
8.1.40.0000.00917.42
8.1.30.0030.00617.63
8.1.20.0000.00717.55
8.1.10.0000.00717.44
8.1.00.0030.00617.40
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00718.48
8.0.270.0000.00717.30
8.0.260.0050.00217.31
8.0.250.0030.00316.86
8.0.240.0000.00716.86
8.0.230.0070.00016.94
8.0.220.0070.00016.86
8.0.210.0050.00216.89
8.0.200.0070.00016.91
8.0.190.0060.00316.85
8.0.180.0070.00016.94
8.0.170.0070.00016.80
8.0.160.0030.00316.78
8.0.150.0070.00016.83
8.0.140.0040.00416.80
8.0.130.0070.00013.34
8.0.120.0040.00416.88
8.0.110.0040.00416.89
8.0.100.0000.00816.73
8.0.90.0040.00416.95
8.0.80.0120.00316.93
8.0.70.0040.00416.77
8.0.60.0050.00316.90
8.0.50.0060.00316.88
8.0.30.0030.01317.04
8.0.20.0100.01017.40
8.0.10.0040.00416.89
8.0.00.0060.01216.72
7.4.330.0060.00016.91
7.4.320.0020.00516.52
7.4.300.0000.00616.61
7.4.290.0030.00316.52
7.4.280.0060.00316.56
7.4.270.0030.00316.53
7.4.260.0030.00316.64
7.4.250.0030.00316.61
7.4.240.0040.00316.54
7.4.230.0000.00716.50
7.4.220.0160.00316.63
7.4.210.0080.01116.43
7.4.200.0020.00516.45
7.4.160.0120.00416.55
7.4.150.0030.01317.40
7.4.140.0110.01217.86
7.4.130.0040.01316.41
7.4.120.0070.01016.43
7.4.110.0160.00516.37
7.4.100.0120.01016.55
7.4.90.0040.01416.47
7.4.80.0070.01317.95
7.4.70.0100.01116.45
7.4.60.0070.01216.56
7.4.50.0090.01016.39
7.4.40.0090.01016.51
7.4.30.0110.01016.41
7.4.20.0110.01516.11
7.4.10.0100.01415.56
7.4.00.0080.01015.12
7.3.330.0020.00213.22
7.3.320.0030.00313.32
7.3.310.0000.00716.20
7.3.300.0070.00016.22
7.3.290.0050.00916.33
7.3.280.0110.00916.27
7.3.270.0090.00917.40
7.3.260.0060.01016.23
7.3.250.0110.00616.27
7.3.240.0090.00916.56
7.3.230.0080.01216.33
7.3.220.0110.01116.49
7.3.210.0100.00916.28
7.3.200.0080.01216.31
7.3.190.0160.02416.27
7.3.180.0080.01216.38
7.3.170.0100.01316.40
7.3.160.0070.01316.27
7.3.150.0120.01216.26
7.3.140.0130.01316.05
7.3.130.0060.01515.53
7.3.120.0090.00815.05
7.3.110.0100.00915.11
7.3.100.0080.01115.09
7.3.90.0060.01014.98
7.3.80.0050.00915.04
7.3.70.0050.01315.01
7.3.60.0090.00715.04
7.3.50.0070.00915.06
7.3.40.0050.01015.01
7.3.30.0050.00915.04
7.3.20.0080.00516.53
7.3.10.0080.00816.52
7.3.00.0070.00716.63
7.2.340.0100.01016.55
7.2.330.0090.00816.77
7.2.320.0140.00716.57
7.2.310.0140.00516.67
7.2.300.0160.00616.76
7.2.290.0090.01016.75
7.2.280.0100.01016.42
7.2.270.0150.01116.18
7.2.260.0130.00915.50
7.2.250.0090.00915.05
7.2.240.0070.01315.34
7.2.230.0060.01215.19
7.2.220.0080.01115.14
7.2.210.0060.00915.32
7.2.200.0080.00615.27
7.2.190.0060.00815.25
7.2.180.0080.00815.22
7.2.170.0060.00915.23
7.2.160.0100.00415.32
7.2.150.0090.00616.78
7.2.140.0080.00816.82
7.2.130.0080.00916.74
7.2.120.0090.00616.81
7.2.110.0070.00916.86
7.2.100.0100.00716.83
7.2.90.0060.01116.70
7.2.80.0060.01016.81
7.2.70.0100.00716.90
7.2.60.0080.00916.76
7.2.50.0100.00716.69
7.2.40.0070.01116.82
7.2.30.0110.00716.83
7.2.20.0070.01116.92
7.2.10.0090.01216.78
7.2.00.0070.01017.25
7.1.330.0120.00715.50
7.1.320.0150.00815.56
7.1.310.0100.00715.74
7.1.300.0100.00615.57
7.1.290.0110.00815.67
7.1.280.0100.00715.65
7.1.270.0090.00815.57
7.1.260.0090.00915.61
7.1.250.0100.00715.65
7.1.240.0090.00815.66
7.1.230.0120.00815.58
7.1.220.0110.01015.66
7.1.210.0180.00615.65
7.1.200.0110.00715.47
7.1.190.0120.00615.51
7.1.180.0100.00915.63
7.1.170.0090.01015.54
7.1.160.0080.01115.59
7.1.150.0110.00815.66
7.1.140.0120.01015.65
7.1.130.0100.01115.55
7.1.120.0110.00815.59
7.1.110.0090.00915.64
7.1.100.0100.01016.13
7.1.90.0120.00915.64
7.1.80.0100.00715.67
7.1.70.0090.00915.86
7.1.60.0090.01016.34
7.1.50.0130.01219.40
7.1.40.0180.00715.60
7.1.30.0140.00315.59
7.1.20.0090.00815.61
7.1.10.0130.00615.50
7.1.00.0090.02216.91
7.0.330.0060.01015.20
7.0.320.0110.00915.21
7.0.310.0060.01015.06
7.0.300.0090.00815.29
7.0.290.0100.00815.24
7.0.280.0100.00915.26
7.0.270.0130.00715.15
7.0.260.0090.01115.28
7.0.250.0120.00615.24
7.0.240.0100.00915.41
7.0.230.0110.00915.32
7.0.220.0110.00915.30
7.0.210.0130.00615.19
7.0.200.0090.00815.25
7.0.190.0120.00615.34
7.0.180.0100.00915.32
7.0.170.0120.00715.30
7.0.160.0090.01015.28
7.0.150.0100.00915.18
7.0.140.0090.00815.22
7.0.130.0110.00815.24
7.0.120.0110.00715.21
7.0.110.0090.00915.15
7.0.100.0090.00815.25
7.0.90.0110.00915.21
7.0.80.0090.01015.22
7.0.70.0100.00815.25
7.0.60.0100.01516.19
7.0.50.0090.01715.87
7.0.40.0090.01615.15
7.0.30.0390.01115.05
7.0.20.0170.01515.08
7.0.10.0110.01515.03
7.0.00.0110.01215.01
5.6.400.0100.00914.78
5.6.390.0100.00914.59
5.6.380.0140.00814.78
5.6.370.0100.01114.69
5.6.360.0130.00714.65
5.6.350.0110.01014.82
5.6.340.0130.00814.69
5.6.330.0130.01014.65
5.6.320.0100.01014.57
5.6.310.0110.01014.74
5.6.300.0100.00914.70
5.6.290.0060.01314.80
5.6.280.0080.01415.84
5.6.270.0110.00714.57
5.6.260.0110.00814.73
5.6.250.0120.00614.68
5.6.240.0110.00814.70
5.6.230.0080.00914.57
5.6.220.0100.00914.64
5.6.210.0110.01415.80
5.6.200.0110.02115.35
5.6.190.0110.02115.95
5.6.180.0120.02415.81
5.6.170.0120.02315.83
5.6.160.0100.01315.84
5.6.150.0100.01615.38
5.6.140.0090.02215.39
5.6.130.0100.02415.41
5.6.120.0100.01715.95
5.6.110.0070.02116.03
5.6.100.0110.01515.99
5.6.90.0110.02315.93
5.6.80.0100.01815.78
5.6.70.0080.01114.62
5.6.60.0090.00814.66
5.6.50.0090.01114.46
5.6.40.0070.01114.64
5.6.30.0080.00914.50
5.6.20.0110.00814.66
5.6.10.0120.00614.67
5.6.00.0120.00714.66
5.5.380.0100.00814.69
5.5.370.0120.00914.42
5.5.360.0090.01014.70
5.5.350.0820.01715.75
5.5.340.0100.02415.18
5.5.330.0130.02215.74
5.5.320.0130.01715.71
5.5.310.0120.02315.82
5.5.300.0110.02415.29
5.5.290.0120.02115.22
5.5.280.0100.02015.80
5.5.270.0100.01615.80
5.5.260.0080.01715.83
5.5.250.0090.02415.79
5.5.240.0100.02215.66
5.5.230.0110.00814.43
5.5.220.0120.00914.48
5.5.210.0120.00614.60
5.5.200.0120.00514.54
5.5.190.0080.00814.58
5.5.180.0130.00614.63
5.5.170.0110.00814.59
5.5.160.0140.00714.59
5.5.150.0080.01214.59
5.5.140.0120.00714.45
5.5.130.0110.00814.48
5.5.120.0110.00914.65
5.5.110.0080.01114.53
5.5.100.0100.01014.47
5.5.90.0120.00914.50
5.5.80.0090.00914.63
5.5.70.0170.00714.54
5.5.60.0090.00814.54
5.5.50.0100.01014.58
5.5.40.0100.00814.52
5.5.30.0090.01014.71
5.5.20.0120.00714.52
5.5.10.0090.01014.62
5.5.00.0080.01114.42

preferences:
50.64 ms | 401 KiB | 5 Q