3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bear { private $age = 0; public function setAge($age) { if ($age < 0) { throw new Exception('Bear cannot have negative age dumbass'); } $this->age = $age; } } $bear1 = new Bear(); $bear1->setAge(25); $bear2 = new Bear(); $bear2->setAge(35); var_dump($bear1); var_dump($bear2);

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.47
8.3.50.0150.00321.91
8.3.40.0140.00018.46
8.3.30.0140.00718.57
8.3.20.0080.00020.34
8.3.10.0040.00423.67
8.3.00.0000.00820.57
8.2.180.0040.01516.63
8.2.170.0110.00422.96
8.2.160.0030.01320.52
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00420.97
8.2.120.0080.00026.35
8.2.110.0080.00419.27
8.2.100.0070.00417.72
8.2.90.0050.00519.27
8.2.80.0080.00017.97
8.2.70.0000.00817.13
8.2.60.0030.00517.93
8.2.50.0040.00418.07
8.2.40.0000.00822.13
8.2.30.0040.00420.62
8.2.20.0040.00417.52
8.2.10.0000.00818.01
8.2.00.0000.00717.93
8.1.280.0090.00625.92
8.1.270.0000.00920.40
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0090.00021.29
8.1.230.0000.01217.45
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0070.00317.23
8.1.190.0050.00317.22
8.1.180.0060.00318.10
8.1.170.0000.00818.59
8.1.160.0050.00320.68
8.1.150.0040.00418.81
8.1.140.0050.00317.43
8.1.130.0040.00417.72
8.1.120.0070.00017.41
8.1.110.0040.00417.31
8.1.100.0040.00417.32
8.1.90.0000.00717.39
8.1.80.0050.00317.40
8.1.70.0000.00717.30
8.1.60.0030.00517.63
8.1.50.0060.00317.54
8.1.40.0060.00317.59
8.1.30.0030.00617.73
8.1.20.0030.00617.66
8.1.10.0040.00417.52
8.1.00.0040.00417.50
8.0.300.0000.00718.77
8.0.290.0050.00516.75
8.0.280.0000.00718.40
8.0.270.0000.00816.77
8.0.260.0030.00317.19
8.0.250.0040.00416.88
8.0.240.0060.00016.77
8.0.230.0000.00716.90
8.0.220.0000.00716.85
8.0.210.0070.00016.78
8.0.200.0060.00016.77
8.0.190.0040.00416.95
8.0.180.0000.00716.78
8.0.170.0000.00716.75
8.0.160.0000.00716.80
8.0.150.0040.00416.74
8.0.140.0060.00316.72
8.0.130.0000.00613.25
8.0.120.0060.00316.83
8.0.110.0070.00016.84
8.0.100.0000.00816.86
8.0.90.0070.00016.72
8.0.80.0090.00916.91
8.0.70.0000.00716.67
8.0.60.0040.00416.83
8.0.50.0000.00716.69
8.0.30.0120.00717.05
8.0.20.0120.00717.41
8.0.10.0040.00416.91
8.0.00.0110.01016.78
7.4.330.0050.00016.74
7.4.320.0030.00316.48
7.4.300.0060.00016.52
7.4.290.0040.00416.61
7.4.280.0040.00416.49
7.4.270.0070.00016.54
7.4.260.0030.00316.59
7.4.250.0040.00416.58
7.4.240.0010.00616.54
7.4.230.0050.00216.71
7.4.220.0100.01416.41
7.4.210.0060.01216.59
7.4.200.0030.00316.40
7.4.160.0120.00616.48
7.4.150.0120.00617.40
7.4.140.0110.00917.86
7.4.130.0050.01316.35
7.4.120.0130.00416.46
7.4.110.0090.00916.26
7.4.100.0150.00916.39
7.4.90.0030.01616.41
7.4.80.0150.00319.39
7.4.70.0090.00916.57
7.4.60.0070.01016.44
7.4.50.0100.00716.48
7.4.40.0130.00616.36
7.4.30.0150.00316.35
7.4.10.0060.01315.07
7.4.00.0070.00815.07
7.3.330.0020.00413.11
7.3.320.0000.00613.32
7.3.310.0030.00316.34
7.3.300.0040.00416.16
7.3.290.0030.00316.21
7.3.280.0100.01216.22
7.3.270.0140.00317.40
7.3.260.0130.00416.41
7.3.250.0090.00916.38
7.3.240.0090.01016.26
7.3.230.0110.00816.39
7.3.210.0110.00716.41
7.3.200.0060.00916.31
7.3.190.0090.00616.50
7.3.180.0050.01116.28
7.3.170.0140.01016.39
7.3.160.0040.01116.33
7.3.130.0090.00914.99
7.3.120.0030.01314.52
7.3.110.0090.00614.66
7.3.100.0120.00314.46
7.3.90.0090.00614.42
7.3.80.0090.01014.71
7.3.70.0070.01114.54
7.3.60.0000.01214.90
7.3.50.0110.00314.55
7.3.40.0000.01414.77
7.3.30.0100.00714.83
7.3.20.0030.01316.49
7.3.10.0000.01316.37
7.3.00.0060.00616.54
7.2.330.0130.01016.54
7.2.320.0090.00916.67
7.2.310.0030.01416.66
7.2.300.0120.01216.65
7.2.290.0130.00316.65
7.2.260.0140.00314.98
7.2.250.0070.01114.75
7.2.240.0060.00914.66
7.2.230.0030.01015.19
7.2.220.0000.01015.16
7.2.210.0030.00715.00
7.2.200.0070.01114.84
7.2.190.0070.01014.91
7.2.180.0040.01114.86
7.2.170.0040.00814.84
7.2.160.0120.00314.91
7.2.150.0060.00616.96
7.2.140.0040.01216.80
7.2.130.0030.01016.96
7.2.120.0100.00716.75
7.2.110.0100.00016.89
7.2.100.0100.00616.77
7.2.90.0070.01016.71
7.2.80.0040.01116.93
7.2.70.0110.00016.85
7.2.60.0120.00316.99
7.2.50.0070.01016.72
7.2.40.0030.01016.68
7.2.30.0090.00316.70
7.2.20.0070.01316.48
7.2.10.0090.00616.79
7.2.00.0070.00718.05
7.1.330.0030.01015.80
7.1.320.0000.01315.79
7.1.310.0110.00715.86
7.1.300.0080.00615.78
7.1.290.0040.01216.02
7.1.280.0060.00615.63
7.1.270.0040.01115.73
7.1.260.0090.00615.88
7.1.250.0110.00415.58
7.1.240.0100.00315.85
7.1.230.0040.00415.70
7.1.220.0080.00815.74
7.1.210.0030.01315.83
7.1.200.0070.01015.90
7.1.190.0070.00715.78
7.1.180.0120.00315.93
7.1.170.0060.01015.84
7.1.160.0080.00416.01
7.1.150.0090.00615.53
7.1.140.0070.00715.95
7.1.130.0090.00915.79
7.1.120.0130.00315.95
7.1.110.0000.01015.85
7.1.100.0040.00816.81
7.1.90.0130.00315.53
7.1.80.0040.00415.70
7.1.70.0040.01116.48
7.1.60.0090.00717.67
7.1.50.0050.01116.36
7.1.40.0040.01215.89
7.1.30.0090.00615.79
7.1.20.0000.01015.85
7.1.10.0070.00715.95
7.1.00.0050.03919.01
7.0.330.0040.01115.43
7.0.320.0030.01015.49
7.0.310.0000.01115.34
7.0.300.0000.00915.38
7.0.290.0060.00615.40
7.0.280.0030.01515.60
7.0.270.0000.00815.49
7.0.260.0100.00015.50
7.0.250.0140.00015.42
7.0.240.0070.00415.22
7.0.230.0060.01015.33
7.0.220.0040.00815.19
7.0.210.0050.00515.31
7.0.200.0020.00716.01
7.0.190.0070.00715.17
7.0.180.0030.00915.48
7.0.170.0080.00815.60
7.0.160.0000.01115.37
7.0.150.0090.00615.42
7.0.140.0000.01515.36
7.0.130.0090.00315.35
7.0.120.0000.01115.59
7.0.110.0070.00315.31
7.0.100.0040.00715.31
7.0.90.0030.01015.42
7.0.80.0000.01315.43
7.0.70.0040.00715.34
7.0.60.0070.03717.75
7.0.50.0060.02716.67
7.0.40.0060.02316.70
7.0.30.0200.04116.90
7.0.20.0180.03516.76
7.0.10.0030.03316.74
7.0.00.0090.04416.87
5.6.400.0000.01314.71
5.6.390.0060.01014.25
5.6.380.0000.00914.70
5.6.370.0060.00614.04
5.6.360.0060.00614.43
5.6.350.0000.01214.39
5.6.340.0070.01014.52
5.6.330.0060.00614.57
5.6.320.0030.01014.52
5.6.310.0030.00714.63
5.6.300.0100.00314.28
5.6.290.0060.00914.27
5.6.280.0040.01917.78
5.6.270.0100.00314.72
5.6.260.0030.00714.40
5.6.250.0070.00714.69
5.6.240.0030.01314.37
5.6.230.0040.00714.25
5.6.220.0080.00814.18
5.6.210.0110.04017.51
5.6.200.0050.04516.21
5.6.190.0080.03117.46
5.6.180.0070.02917.46
5.6.170.0130.02517.38
5.6.160.0050.03617.37
5.6.150.0100.03816.27
5.6.140.0030.02316.47
5.6.130.0060.02416.25
5.6.120.0100.02317.93
5.6.110.0020.05117.66
5.6.100.0130.04117.74
5.6.90.0070.02917.72
5.6.80.0080.03717.50
5.6.70.0100.00314.30
5.6.60.0070.00714.26
5.6.50.0070.00714.09
5.6.40.0040.01114.05
5.6.30.0090.00014.08
5.6.20.0030.00714.16
5.6.10.0040.00814.31
5.6.00.0080.00014.29
5.5.380.0030.00614.41
5.5.370.0040.01514.50
5.5.360.0060.00914.36
5.5.350.1720.02217.22
5.5.340.0070.04516.18
5.5.330.0050.04517.53
5.5.320.0290.02917.33
5.5.310.0110.02817.29
5.5.300.0030.04316.18
5.5.290.0030.04716.24
5.5.280.0030.02717.42
5.5.270.0080.04217.68
5.5.260.0110.04517.63
5.5.250.0050.04317.50
5.5.240.1930.02017.04
5.5.230.0090.00614.34
5.5.220.0030.00614.28
5.5.210.0030.01014.03
5.5.200.0030.00614.34
5.5.190.0030.00614.24
5.5.180.0040.00714.36
5.5.170.0030.01014.30
5.5.160.0000.01114.19
5.5.150.0060.00614.23
5.5.140.0000.00814.27
5.5.130.0040.01114.29
5.5.120.0080.00814.45
5.5.110.0070.01114.26
5.5.100.0070.00414.41
5.5.90.0070.01014.18
5.5.80.0030.00614.19
5.5.70.0100.00314.38
5.5.60.0050.00314.03
5.5.50.0130.00314.36
5.5.40.0050.00514.46
5.5.30.0070.00714.09
5.5.20.0030.00814.01
5.5.10.0000.01114.15
5.5.00.0060.00314.23

preferences:
61.08 ms | 401 KiB | 5 Q