3v4l.org

run code in 300+ PHP versions simultaneously
<?php class NumberValue { protected $m_unitin = false; } class QuantityValue extends NumberValue { public function __construct() { $this->setUnit(); } protected function setUnit() { assert( '$this->m_unitin != 0' ); $this->m_unitin = 'K'; } public function getUnit() { return $this->m_unitin; } } $quantityValue = new QuantityValue(); echo( $quantityValue->getUnit() );

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.0060.01218.30
8.3.50.0140.00522.05
8.3.40.0070.01018.79
8.3.30.0120.00318.61
8.3.20.0040.00420.00
8.3.10.0030.00518.77
8.3.00.0080.00018.96
8.2.180.0070.01116.63
8.2.170.0060.00922.96
8.2.160.0040.01119.20
8.2.150.0000.00724.18
8.2.140.0040.00424.66
8.2.130.0050.00319.38
8.2.120.0080.00026.35
8.2.110.0050.00320.90
8.2.100.0040.00817.63
8.2.90.0040.00419.08
8.2.80.0000.00817.97
8.2.70.0080.00017.50
8.2.60.0040.00417.79
8.2.50.0040.00418.10
8.2.40.0040.00420.32
8.2.30.0030.00320.67
8.2.20.0080.00017.69
8.2.10.0050.00217.98
8.2.00.0050.00318.04
8.1.280.0040.01425.92
8.1.270.0030.00623.88
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0060.00322.73
8.1.230.0120.00017.42
8.1.220.0040.00417.79
8.1.210.0000.00818.77
8.1.200.0080.00317.36
8.1.190.0000.00817.23
8.1.180.0000.00718.10
8.1.170.0030.00518.65
8.1.160.0040.00420.89
8.1.150.0030.00718.84
8.1.140.0030.00519.50
8.1.130.0030.00317.55
8.1.120.0040.00417.43
8.1.110.0040.00317.32
8.1.100.0000.00817.40
8.1.90.0040.00417.30
8.1.80.0070.00017.23
8.1.70.0040.00417.29
8.1.60.0050.00217.59
8.1.50.0040.00417.41
8.1.40.0000.00817.58
8.1.30.0040.00417.63
8.1.20.0060.00317.51
8.1.10.0040.00417.43
8.1.00.0050.00317.43
8.0.300.0050.00218.77
8.0.290.0070.00016.75
8.0.280.0000.00718.32
8.0.270.0070.00017.18
8.0.260.0060.00018.45
8.0.250.0030.00317.00
8.0.240.0050.00316.93
8.0.230.0000.00716.87
8.0.220.0040.00416.89
8.0.210.0050.00316.94
8.0.200.0060.00016.85
8.0.190.0040.00416.94
8.0.180.0040.00416.98
8.0.170.0030.00316.85
8.0.160.0040.00416.92
8.0.150.0040.00416.96
8.0.140.0000.00716.90
8.0.130.0030.00613.36
8.0.120.0080.00016.87
8.0.110.0000.00716.89
8.0.100.0000.00716.94
8.0.90.0040.00417.01
8.0.80.0140.00616.91
8.0.70.0070.00016.86
8.0.60.0040.00416.75
8.0.50.0020.00516.72
8.0.30.0080.01117.11
8.0.20.0090.00917.40
8.0.10.0070.00017.13
8.0.00.0080.01116.81
7.4.330.0030.00315.08
7.4.320.0000.00616.59
7.4.300.0030.00316.59
7.4.290.0030.00316.63
7.4.280.0050.00316.61
7.4.270.0040.00416.61
7.4.260.0000.00816.63
7.4.250.0050.00216.57
7.4.240.0040.00416.51
7.4.230.0040.00416.60
7.4.220.0120.00616.53
7.4.210.0040.01116.47
7.4.200.0030.00316.50
7.4.160.0120.00416.59
7.4.150.0120.00617.40
7.4.140.0100.00717.86
7.4.130.0080.01016.56
7.4.120.0090.01216.59
7.4.110.0100.00716.43
7.4.100.0060.01216.44
7.4.90.0120.00916.57
7.4.80.0120.00619.39
7.4.70.0130.00716.51
7.4.60.0030.01316.44
7.4.50.0100.00716.41
7.4.40.0160.00616.29
7.4.30.0000.01616.42
7.4.00.0000.01414.80
7.3.330.0000.00513.18
7.3.320.0000.00613.16
7.3.310.0000.00716.35
7.3.300.0000.00716.32
7.3.290.0120.00516.37
7.3.280.0100.00816.33
7.3.270.0100.00717.40
7.3.260.0170.00016.34
7.3.250.0110.00816.47
7.3.240.0110.00816.35
7.3.230.0100.00616.39
7.3.210.0140.00316.57
7.3.200.0130.00316.57
7.3.190.0130.00316.45
7.3.180.0110.00516.29
7.3.170.0140.00616.38
7.3.160.0120.00316.29
7.3.10.0090.00616.39
7.3.00.0080.00416.66
7.2.330.0100.01016.64
7.2.320.0120.00616.58
7.2.310.0100.00716.37
7.2.300.0030.01416.77
7.2.290.0030.01516.68
7.2.130.0030.01316.78
7.2.120.0100.00316.47
7.2.110.0000.01416.77
7.2.100.0060.00616.75
7.2.90.0080.00716.68
7.2.80.0130.00017.09
7.2.70.0060.00316.95
7.2.60.0060.00616.67
7.2.50.0040.00816.50
7.2.40.0060.00316.67
7.2.30.0060.00317.03
7.2.20.0080.00416.71
7.2.10.0040.00816.63
7.2.00.0070.01016.85
7.1.250.0030.01015.62
7.1.200.0050.00215.73
7.1.100.0040.00717.82
7.1.70.0150.00417.09
7.1.60.0060.01319.48
7.1.50.0060.00616.95
7.1.00.0130.06322.57
7.0.200.0120.00316.42
7.0.60.0200.08019.99
7.0.50.0170.06717.96
7.0.40.0270.06020.30
7.0.30.0300.05320.22
7.0.20.0270.06320.10
7.0.10.0130.07320.23
7.0.00.0130.06320.39
5.6.280.0070.07021.05
5.6.210.0000.06020.67
5.6.200.0030.07018.22
5.6.190.0470.06020.44
5.6.180.0170.06320.69
5.6.170.0270.05020.70
5.6.160.0200.05720.62
5.6.150.0200.05720.39
5.6.140.0270.05020.39
5.6.130.0170.06020.42
5.6.120.0200.05720.32
5.6.110.0270.04720.38
5.6.100.0200.05720.41
5.6.90.0400.05320.34
5.6.80.0200.05319.79
5.6.70.0100.06019.79
5.6.60.0070.06719.77
5.6.50.0200.05019.79
5.6.40.0230.05319.64
5.6.30.0170.06019.75
5.6.20.0200.07019.74
5.6.10.0300.04319.72
5.6.00.0200.05719.62
5.5.350.0100.09020.45
5.5.340.0170.07718.08
5.5.330.0200.08020.36
5.5.320.0300.05020.27
5.5.310.0270.06020.38
5.5.300.0100.06720.00
5.5.290.0200.05020.21
5.5.280.0170.05720.21
5.5.270.0230.05320.43
5.5.260.0230.05720.18
5.5.250.0300.05320.01
5.5.240.0170.06019.58
5.5.230.0300.04719.54
5.5.220.0270.05319.38
5.5.210.0130.06019.53
5.5.200.0270.07719.07
5.5.190.0170.06019.51
5.5.180.0200.05719.37
5.5.160.0070.06719.54
5.5.150.0230.07019.74
5.5.140.0230.06719.35
5.5.130.0200.06719.50
5.5.120.0200.05319.41
5.5.110.0230.05319.54
5.5.100.0200.05319.46
5.5.90.0300.05719.19
5.5.80.0370.03719.43
5.5.70.0170.05719.45
5.5.60.0100.06319.44
5.5.50.0370.04019.34
5.5.40.0200.05319.63
5.5.30.0200.05019.36
5.5.20.0300.04019.41
5.5.10.0270.05019.35
5.5.00.0100.06319.35

preferences:
32.48 ms | 401 KiB | 5 Q