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' ); $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.0150.00618.28
8.3.50.0030.01418.30
8.3.40.0100.00718.67
8.3.30.0140.00018.85
8.3.20.0080.00020.14
8.3.10.0080.00018.71
8.3.00.0000.00818.98
8.2.180.0100.01016.38
8.2.170.0090.00622.96
8.2.160.0140.00719.26
8.2.150.0070.00024.18
8.2.140.0000.00824.66
8.2.130.0090.00019.36
8.2.120.0050.00326.35
8.2.110.0080.00320.23
8.2.100.0090.00317.63
8.2.90.0050.00319.05
8.2.80.0050.00317.97
8.2.70.0030.00517.63
8.2.60.0070.00317.91
8.2.50.0040.00418.10
8.2.40.0050.00320.50
8.2.30.0000.00720.63
8.2.20.0000.00717.75
8.2.10.0070.00018.05
8.2.00.0070.00417.90
8.1.280.0090.01225.92
8.1.270.0050.00324.02
8.1.260.0040.00428.09
8.1.250.0070.01128.09
8.1.240.0060.00322.01
8.1.230.0080.00417.48
8.1.220.0030.00517.74
8.1.210.0050.00318.77
8.1.200.0030.00617.23
8.1.190.0050.00317.25
8.1.180.0000.00918.10
8.1.170.0080.00018.65
8.1.160.0070.00020.81
8.1.150.0000.00818.82
8.1.140.0040.00419.52
8.1.130.0030.00317.61
8.1.120.0080.00017.44
8.1.110.0070.00017.37
8.1.100.0000.00817.42
8.1.90.0000.00817.41
8.1.80.0040.00417.38
8.1.70.0070.00017.39
8.1.60.0040.00417.64
8.1.50.0000.00917.59
8.1.40.0030.00517.41
8.1.30.0000.00817.66
8.1.20.0040.00417.67
8.1.10.0030.00517.52
8.1.00.0000.00917.60
8.0.300.0000.00818.77
8.0.290.0030.00616.75
8.0.280.0000.00718.32
8.0.270.0030.00317.14
8.0.260.0000.00717.19
8.0.250.0030.00316.89
8.0.240.0050.00316.96
8.0.230.0030.00417.02
8.0.220.0030.00516.79
8.0.210.0040.00416.94
8.0.200.0070.00016.82
8.0.190.0030.00616.98
8.0.180.0060.00316.93
8.0.170.0070.00016.91
8.0.160.0000.00716.95
8.0.150.0000.00716.82
8.0.140.0040.00416.83
8.0.130.0050.00513.37
8.0.120.0040.00416.82
8.0.110.0000.00716.83
8.0.100.0080.00016.96
8.0.90.0000.00716.77
8.0.80.0060.00916.93
8.0.70.0000.00716.91
8.0.60.0030.00616.77
8.0.50.0000.00716.90
8.0.30.0130.00816.88
8.0.20.0070.01317.40
8.0.10.0000.00817.00
8.0.00.0130.00516.85
7.4.330.0000.00515.08
7.4.320.0060.00016.52
7.4.300.0000.00716.63
7.4.290.0030.00316.48
7.4.280.0040.00416.58
7.4.270.0090.00016.36
7.4.260.0020.00516.50
7.4.250.0050.00216.55
7.4.240.0040.00416.47
7.4.230.0030.00316.34
7.4.220.0070.01116.51
7.4.210.0110.00616.60
7.4.200.0030.00316.41
7.4.160.0090.00616.62
7.4.150.0130.00317.40
7.4.140.0110.00617.86
7.4.130.0110.00616.51
7.4.120.0070.00916.74
7.4.110.0140.00316.51
7.4.100.0160.00816.49
7.4.90.0160.00316.61
7.4.80.0060.01119.39
7.4.70.0060.00916.41
7.4.60.0100.00616.60
7.4.50.0100.00516.58
7.4.40.0130.01016.38
7.4.30.0130.00316.44
7.4.00.0030.01315.19
7.3.330.0000.00613.33
7.3.320.0000.00513.23
7.3.310.0030.00316.39
7.3.300.0000.00716.38
7.3.290.0100.00816.33
7.3.280.0080.00916.36
7.3.270.0060.01217.40
7.3.260.0030.01816.27
7.3.250.0080.01116.44
7.3.240.0100.01016.30
7.3.230.0130.00316.62
7.3.210.0100.00716.52
7.3.200.0090.00616.34
7.3.190.0110.00716.44
7.3.180.0090.00616.48
7.3.170.0100.00916.38
7.3.160.0090.00616.46
7.3.10.0040.01116.72
7.3.00.0050.00316.48
7.2.330.0160.00916.66
7.2.320.0070.01116.31
7.2.310.0200.00416.50
7.2.300.0100.00716.47
7.2.290.0060.00916.86
7.2.130.0100.00717.02
7.2.120.0100.00716.67
7.2.110.0000.01516.86
7.2.100.0070.01017.07
7.2.90.0060.00616.99
7.2.80.0070.01116.95
7.2.70.0060.00916.86
7.2.60.0070.00916.83
7.2.50.0070.00717.20
7.2.40.0030.01316.63
7.2.30.0140.00016.98
7.2.20.0030.01316.78
7.2.10.0060.00917.00
7.2.00.0010.00918.26
7.1.250.0030.01015.60
7.1.200.0030.01015.59
7.1.100.0070.00717.98
7.1.70.0060.00317.03
7.1.60.0000.01619.48
7.1.50.0040.01116.89
7.1.00.0130.06722.34
7.0.200.0100.00616.79
7.0.60.0270.07720.02
7.0.50.0100.04717.91
7.0.40.0500.07020.08
7.0.30.0670.06020.14
7.0.20.0730.06020.27
7.0.10.0730.06020.09
7.0.00.0000.06720.26
5.6.280.0070.07020.90
5.6.210.0230.06720.71
5.6.200.0100.04318.18
5.6.190.0500.07020.56
5.6.180.0570.05320.62
5.6.170.0730.04720.61
5.6.160.0270.07020.60
5.6.150.0500.06020.42
5.6.140.0230.06020.27
5.6.130.0170.05720.35
5.6.120.0170.06320.39
5.6.110.0070.06320.37
5.6.100.0200.05720.58
5.6.90.0200.06020.38
5.6.80.0170.05719.75
5.6.70.0330.05719.58
5.6.60.0700.06319.69
5.6.50.0600.05019.75
5.6.40.0470.06019.67
5.6.30.0670.05319.77
5.6.20.0600.05319.72
5.6.10.0570.05019.65
5.6.00.0530.06319.71
5.5.350.0130.08020.50
5.5.340.0030.08017.99
5.5.330.0530.06020.38
5.5.320.0570.05720.24
5.5.310.0530.05720.40
5.5.300.0170.06020.11
5.5.290.0130.06020.18
5.5.280.0130.06320.16
5.5.270.0170.05720.15
5.5.260.0200.05720.38
5.5.250.0270.04720.00
5.5.240.0230.06019.50
5.5.230.0230.06019.38
5.5.220.0100.06719.46
5.5.210.0630.05019.38
5.5.200.0230.04019.57
5.5.190.0670.04719.58
5.5.180.0600.05019.55
5.5.160.0730.07319.42
5.5.150.0670.05019.44
5.5.140.0530.05719.51
5.5.130.0570.05719.41
5.5.120.0430.05719.73
5.5.110.0430.06019.51
5.5.100.0300.04019.38
5.5.90.0270.05319.40
5.5.80.0370.04019.36
5.5.70.0200.06019.31
5.5.60.0270.04719.30
5.5.50.0170.05319.43
5.5.40.0200.05019.36
5.5.30.0170.05319.50
5.5.20.0330.04319.38
5.5.10.0130.06319.49
5.5.00.0130.06319.52

preferences:
61.71 ms | 401 KiB | 5 Q