3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TextOperator { const CONTAINS = 'contains'; const CONTAINS_NOT = 'containsnot'; } abstract class Condition { protected $operator; protected $value; public function __construct($value, $operator) { $this->setValue($value); $this->setOperator($operator); } abstract public function setOperator($operator); abstract public function setValue($value); public function getOperator() { return $this->operator; } public function getValue() { return $this->value; } } class TextCondition extends Condition { public function __construct($value, $operator = TextOperator::CONTAINS) { parent::__construct($value, $operator); } public function setOperator($operator) { $this->operator = TextOperator::get($operator); } public function setValue($value) { $this->value = (string)$value; } } $cond1 = new TextCondition(TextOperator::CONTAINS, 'foo'); $cond2 = new TextCondition(TextOperator::CONTAINS, 'bar'); var_dump($cond1, $cond2);

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.00418.43
8.3.50.0140.00522.05
8.3.40.0150.00618.97
8.3.30.0000.01419.17
8.3.20.0080.00020.04
8.3.10.0070.00021.89
8.3.00.0080.00019.16
8.2.180.0060.01216.50
8.2.170.0160.00322.96
8.2.160.0100.00722.16
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0050.00326.16
8.2.120.0000.00819.77
8.2.110.0060.00322.14
8.2.100.0100.00319.45
8.2.90.0040.00419.05
8.2.80.0000.00817.97
8.2.70.0040.00417.50
8.2.60.0000.00817.80
8.2.50.0030.00518.07
8.2.40.0040.00419.76
8.2.30.0080.00018.01
8.2.20.0000.00817.68
8.2.10.0000.00817.88
8.2.00.0040.00417.76
8.1.280.0080.00825.92
8.1.270.0040.00418.83
8.1.260.0130.00626.35
8.1.250.0040.00428.09
8.1.240.0040.00423.97
8.1.230.0070.00319.04
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0000.00817.22
8.1.190.0000.00816.88
8.1.180.0000.00919.01
8.1.170.0050.00518.35
8.1.160.0040.00421.88
8.1.150.0040.00418.66
8.1.140.0040.00417.32
8.1.130.0070.00017.89
8.1.120.0040.00417.33
8.1.110.0000.00817.34
8.1.100.0000.00717.41
8.1.90.0000.00717.42
8.1.80.0000.00717.40
8.1.70.0000.00717.50
8.1.60.0090.00017.57
8.1.50.0060.00317.51
8.1.40.0050.00317.45
8.1.30.0030.00617.54
8.1.20.0030.00517.64
8.1.10.0030.00517.55
8.1.00.0040.00417.41
8.0.300.0050.00218.77
8.0.290.0040.00416.63
8.0.280.0000.00718.26
8.0.270.0000.00717.22
8.0.260.0040.00417.09
8.0.250.0000.00716.96
8.0.240.0030.00316.95
8.0.230.0000.00716.99
8.0.220.0040.00416.95
8.0.210.0040.00416.86
8.0.200.0030.00317.02
8.0.190.0040.00416.94
8.0.180.0040.00416.92
8.0.170.0050.00216.76
8.0.160.0070.00016.79
8.0.150.0000.00716.84
8.0.140.0000.00716.76
8.0.130.0050.00013.30
8.0.120.0000.00816.77
8.0.110.0030.00616.80
8.0.100.0000.00716.74
8.0.90.0040.00416.75
8.0.80.0120.00316.93
8.0.70.0050.00316.86
8.0.60.0040.00416.94
8.0.50.0000.00716.77
8.0.30.0100.01017.08
8.0.20.0140.01017.40
8.0.10.0000.00717.01
8.0.00.0100.00716.84
7.4.330.0000.00515.03
7.4.320.0040.00416.53
7.4.300.0060.00016.54
7.4.290.0000.00816.48
7.4.280.0000.00816.57
7.4.270.0000.00716.47
7.4.260.0030.00516.40
7.4.250.0050.00216.28
7.4.240.0070.00016.47
7.4.230.0000.00716.53
7.4.220.0100.00716.57
7.4.210.0110.00616.59
7.4.200.0040.00416.50
7.4.160.0040.01116.41
7.4.150.0100.00717.40
7.4.140.0130.00817.86
7.4.130.0070.01016.55
7.4.120.0110.00616.58
7.4.110.0070.01216.60
7.4.100.0150.00316.35
7.4.90.0140.00316.43
7.4.80.0120.00819.39
7.4.70.0130.00616.49
7.4.60.0120.00316.59
7.4.50.0030.00316.56
7.4.40.0070.01016.36
7.4.30.0090.01316.57
7.4.00.0000.01514.97
7.3.330.0000.00513.22
7.3.320.0000.00513.23
7.3.310.0070.00016.35
7.3.300.0030.00316.25
7.3.290.0080.00616.32
7.3.280.0100.01016.35
7.3.270.0090.00917.40
7.3.260.0070.01016.57
7.3.250.0080.01616.44
7.3.240.0130.00316.39
7.3.230.0140.00316.45
7.3.210.0130.00316.34
7.3.200.0140.00919.39
7.3.190.0060.01216.55
7.3.180.0090.00616.61
7.3.170.0060.01616.50
7.3.160.0130.00316.33
7.2.330.0090.00916.61
7.2.320.0070.01016.40
7.2.310.0070.01016.63
7.2.300.0130.01016.63
7.2.290.0100.00716.68
7.2.80.0030.00716.64
7.2.60.0030.01016.66
7.2.00.0030.01019.13
7.1.200.0070.00715.81
7.1.100.0000.01118.32
7.1.70.0080.00517.13
7.1.60.0180.00719.46
7.1.50.0030.01916.62
7.1.00.0030.08722.40
7.0.200.0100.01016.75
7.0.140.0000.03721.99
7.0.60.0100.08320.04
7.0.50.0000.05317.89
7.0.40.0100.08020.11
7.0.30.0330.06320.23
7.0.20.0170.04020.07
7.0.10.0100.08320.23
7.0.00.0030.04320.24
5.6.280.0070.07020.93
5.6.210.0100.07720.45
5.6.200.0070.08018.24
5.6.190.0130.08720.55
5.6.180.3370.04320.50
5.6.170.0330.06020.51
5.6.160.0000.04720.46
5.6.150.0030.04018.16
5.6.140.0100.05318.22
5.6.130.0130.07318.29
5.6.120.0130.07721.00
5.6.110.0070.07720.99
5.6.100.0100.08020.95
5.6.90.0070.08721.12
5.6.80.0070.08320.45
5.6.70.4470.03720.29
5.5.350.0370.07020.42
5.5.340.0030.04317.98
5.5.330.0100.06720.13
5.5.320.0330.07720.43
5.5.310.0200.08020.24
5.5.300.0030.03718.09
5.5.290.0070.08018.08
5.5.280.0030.06020.82
5.5.270.0030.05020.84
5.5.260.0070.08320.89
5.5.250.0100.04020.60
5.5.240.0300.06020.20
5.4.450.0130.05719.70
5.4.440.0170.06019.70
5.4.430.0130.05319.63
5.4.420.0130.05019.52
5.4.410.0200.04019.11
5.4.400.0100.05319.29
5.4.390.0200.07718.84
5.4.380.0270.07318.48
5.4.370.0200.07718.71
5.4.360.0300.04318.57
5.4.350.0270.05018.62
5.4.340.0200.05718.48
5.4.320.0270.05318.70
5.4.310.0170.05318.73
5.4.300.0270.05318.75
5.4.290.0200.05318.78
5.4.280.0270.05018.74
5.4.270.0230.06018.75
5.4.260.0230.05318.75
5.4.250.0230.05318.78
5.4.240.0200.06018.44
5.4.230.0230.05018.77
5.4.220.0170.06018.82
5.4.210.0230.04718.78
5.4.200.0200.05016.56
5.4.190.0130.06018.61
5.4.180.0100.06018.57
5.4.170.0230.05018.79
5.4.160.0230.05018.74
5.4.150.0170.05318.46
5.4.140.0100.06016.28
5.4.130.0130.05716.27
5.4.120.0130.05716.36
5.4.110.0200.04716.20
5.4.100.0200.05016.45
5.4.90.0130.06016.44
5.4.80.0070.06016.25
5.4.70.0070.06016.15
5.4.60.0130.05716.18
5.4.50.0170.05016.21
5.4.40.0230.04716.25
5.4.30.0130.05716.20
5.4.20.0200.04716.39
5.4.10.0270.05316.21
5.4.00.0270.05015.67
5.3.290.0230.05314.73
5.3.280.0230.06014.67
5.3.270.0100.06314.80
5.3.260.0130.06714.66
5.3.250.0200.06014.67
5.3.240.0230.05014.82
5.3.230.0230.04314.73
5.3.220.0200.05314.80
5.3.210.0200.05714.72
5.3.200.0130.06314.71
5.3.190.0200.05714.58
5.3.180.0100.05714.58
5.3.170.0200.05314.61
5.3.160.0230.05314.63
5.3.150.0300.04314.58
5.3.140.0200.04714.61
5.3.130.0170.06014.70
5.3.120.0270.05314.68
5.3.110.0170.05314.61
5.3.100.0400.04714.08
5.3.90.0200.06314.14
5.3.80.0270.04714.14
5.3.70.0230.04714.14
5.3.60.0230.04714.25
5.3.50.0270.04013.95
5.3.40.0130.05713.98
5.3.30.0170.05013.92
5.3.20.0170.05013.81
5.3.10.0100.05713.67
5.3.00.0170.06013.68
5.2.170.0130.04311.14
5.2.160.0030.04711.38
5.2.150.0070.04711.31
5.2.140.0200.04011.23
5.2.130.0070.04711.17
5.2.120.0200.03311.25
5.2.110.0100.04311.13
5.2.100.0170.05311.24
5.2.90.0200.03711.16
5.2.80.0070.05011.23
5.2.70.0070.05011.13
5.2.60.0200.04011.10
5.2.50.0230.04011.24
5.2.40.0130.04011.05
5.2.30.0100.04311.05
5.2.20.0030.05711.04
5.2.10.0100.04010.95
5.2.00.0130.03710.94
5.1.60.0130.03710.04
5.1.50.0100.04710.05
5.1.40.0170.04310.02
5.1.30.0270.03310.41
5.1.20.0070.04010.51
5.1.10.0000.04710.13
5.1.00.0070.04010.18
5.0.50.0030.0338.68
5.0.40.0100.0238.61
5.0.30.0070.0438.27
5.0.20.0070.0308.23
5.0.10.0000.0338.32
5.0.00.0170.0378.25
4.4.90.0070.0205.94
4.4.80.0030.0235.88
4.4.70.0000.0275.88
4.4.60.0070.0205.87
4.4.50.0070.0305.98
4.4.40.0030.0375.89
4.4.30.0100.0205.88
4.4.20.0030.0276.02
4.4.10.0030.0276.07
4.4.00.0070.0336.04
4.3.110.0070.0205.89
4.3.100.0070.0235.81
4.3.90.0030.0235.87
4.3.80.0100.0335.77
4.3.70.0030.0235.91
4.3.60.0030.0275.80
4.3.50.0000.0275.79
4.3.40.0030.0375.78
4.3.30.0030.0234.58
4.3.20.0070.0204.58
4.3.10.0030.0234.60
4.3.00.0100.0208.74

preferences:
58.97 ms | 401 KiB | 5 Q