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 = $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.0040.01418.55
8.3.50.0150.00618.07
8.3.40.0060.00918.71
8.3.30.0060.00819.05
8.3.20.0050.00220.21
8.3.10.0050.00321.73
8.3.00.0040.00419.14
8.2.180.0070.01016.50
8.2.170.0100.01022.96
8.2.160.0120.00922.31
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0040.00419.54
8.2.110.0060.00322.16
8.2.100.0060.00619.34
8.2.90.0080.00019.23
8.2.80.0030.00617.97
8.2.70.0060.00317.38
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0000.00819.91
8.2.30.0030.00518.03
8.2.20.0000.00817.55
8.2.10.0030.00517.88
8.2.00.0000.00717.68
8.1.280.0060.00925.92
8.1.270.0040.00418.88
8.1.260.0150.00626.35
8.1.250.0040.00428.09
8.1.240.0090.00023.70
8.1.230.0030.00819.17
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0000.00917.12
8.1.190.0040.00417.10
8.1.180.0060.00318.10
8.1.170.0030.00618.55
8.1.160.0000.00721.90
8.1.150.0060.00318.76
8.1.140.0060.00317.31
8.1.130.0070.00017.84
8.1.120.0070.00017.36
8.1.110.0070.00017.48
8.1.100.0030.00617.39
8.1.90.0040.00417.38
8.1.80.0030.00517.29
8.1.70.0000.00717.51
8.1.60.0000.00817.63
8.1.50.0000.01017.54
8.1.40.0080.00017.59
8.1.30.0030.00617.56
8.1.20.0040.00417.54
8.1.10.0000.00717.50
8.1.00.0030.00617.48
8.0.300.0040.00418.77
8.0.290.0070.00016.63
8.0.280.0030.00318.32
8.0.270.0000.00717.21
8.0.260.0030.00517.13
8.0.250.0030.00316.79
8.0.240.0030.00316.95
8.0.230.0040.00416.79
8.0.220.0030.00316.75
8.0.210.0020.00516.86
8.0.200.0030.00316.90
8.0.190.0040.00416.91
8.0.180.0040.00416.76
8.0.170.0000.00716.88
8.0.160.0050.00216.79
8.0.150.0040.00416.77
8.0.140.0000.00716.76
8.0.130.0030.00313.31
8.0.120.0040.00416.83
8.0.110.0000.00816.89
8.0.100.0040.00416.79
8.0.90.0080.00016.75
8.0.80.0070.01016.79
8.0.70.0000.00716.71
8.0.60.0000.00716.64
8.0.50.0020.00516.77
8.0.30.0090.01617.08
8.0.20.0190.01117.40
8.0.10.0000.00716.93
8.0.00.0110.00716.70
7.4.330.0000.00515.06
7.4.320.0030.00316.51
7.4.300.0030.00316.60
7.4.290.0030.00316.60
7.4.280.0000.00716.40
7.4.270.0030.00316.45
7.4.260.0070.00016.48
7.4.250.0040.00416.51
7.4.240.0040.00316.63
7.4.230.0000.00716.36
7.4.220.0090.00916.45
7.4.210.0060.00916.59
7.4.200.0070.00016.52
7.4.160.0110.00916.63
7.4.150.0060.01217.40
7.4.140.0100.01217.86
7.4.130.0100.00816.52
7.4.120.0090.00816.50
7.4.110.0110.01416.46
7.4.100.0120.01216.61
7.4.90.0110.00616.42
7.4.80.0130.01019.39
7.4.70.0030.01316.50
7.4.60.0060.00916.39
7.4.50.0030.00616.27
7.4.40.0040.01216.41
7.4.30.0130.01016.54
7.4.00.0100.00714.79
7.3.330.0000.00613.15
7.3.320.0030.00313.40
7.3.310.0030.00316.35
7.3.300.0060.00016.20
7.3.290.0070.00916.30
7.3.280.0070.00916.24
7.3.270.0130.00417.40
7.3.260.0090.00916.43
7.3.250.0110.00816.49
7.3.240.0170.00016.36
7.3.230.0030.01416.39
7.3.210.0040.01316.63
7.3.200.0060.00519.39
7.3.190.0110.00716.49
7.3.180.0060.01016.68
7.3.170.0170.00816.62
7.3.160.0060.01016.50
7.3.10.0070.01016.45
7.3.00.0040.01116.73
7.2.330.0100.00716.58
7.2.320.0130.01916.61
7.2.310.0100.01016.69
7.2.300.0180.00316.70
7.2.290.0130.00616.68
7.2.130.0070.00716.80
7.2.120.0090.00316.83
7.2.110.0090.00617.02
7.2.100.0080.00416.90
7.2.90.0040.01216.79
7.2.80.0000.01416.78
7.2.70.0000.01117.02
7.2.60.0090.00616.98
7.2.50.0040.01117.02
7.2.40.0040.01216.76
7.2.30.0070.00716.91
7.2.20.0100.00716.98
7.2.10.0060.00616.86
7.2.00.0000.01218.04
7.1.250.0040.00415.75
7.1.100.0000.01117.93
7.1.70.0040.00416.83
7.1.60.0120.01219.46
7.1.50.0120.00617.04
7.1.00.0070.07322.43
7.0.200.0150.00816.44
7.0.140.0000.03722.15
7.0.60.0070.07320.03
7.0.50.0070.06717.88
7.0.40.0030.04720.24
7.0.30.0300.08320.23
7.0.20.0230.08320.20
7.0.10.0030.04720.09
7.0.00.0100.07320.06
5.6.280.0070.07021.11
5.6.210.0000.04020.68
5.6.200.0170.04018.25
5.6.190.0170.08020.60
5.6.180.0500.06720.61
5.6.170.0300.07320.55
5.6.160.0130.06720.43
5.6.150.0070.03718.18
5.6.140.0100.08018.21
5.6.130.0070.05318.21
5.6.120.0070.08321.13
5.6.110.0000.04321.05
5.6.100.0130.06320.98
5.6.90.0000.05020.97
5.6.80.0170.07020.39
5.5.350.4230.04020.50
5.5.340.0030.03717.99
5.5.330.0100.08020.44
5.5.320.2570.05320.20
5.5.310.0170.04020.27
5.5.300.0170.05318.09
5.5.290.0000.07317.96
5.5.280.0070.07720.82
5.5.270.0030.09320.98
5.5.260.0030.05320.81
5.5.250.0130.06720.57
5.5.240.0070.07720.28
5.4.450.0600.05719.62
5.4.440.0130.06019.55
5.4.430.0100.07319.55
5.4.420.0130.06019.68
5.4.410.0200.04719.33
5.4.400.0100.06719.17
5.4.390.0130.05718.71
5.4.380.0200.06018.70
5.4.370.0200.05718.77
5.4.360.0270.06318.73
5.4.350.0200.05018.77
5.4.340.0130.05318.46
5.4.320.0130.05718.75
5.4.310.0270.04318.57
5.4.300.0200.05018.61
5.4.290.0230.05018.73
5.4.280.0200.05318.70
5.4.270.0170.06018.57
5.4.260.0370.04318.74
5.4.250.0200.05718.83
5.4.240.0230.05018.83
5.4.230.0300.04718.82
5.4.220.0100.06018.60
5.4.210.0170.05318.51
5.4.200.0170.06716.55
5.4.190.0300.05018.46
5.4.180.0270.04718.82
5.4.170.0170.06018.52
5.4.160.0270.04718.55
5.4.150.0200.05318.51
5.4.140.0370.05016.43
5.4.130.0300.07016.22
5.4.120.0270.04716.18
5.4.110.0300.05316.21
5.4.100.0130.06016.27
5.4.90.0270.05716.26
5.4.80.0170.05316.37
5.4.70.0130.06316.22
5.4.60.0270.04316.40
5.4.50.0200.04716.24
5.4.40.0270.04716.41
5.4.30.0270.04316.24
5.4.20.0170.06316.22
5.4.10.0230.05716.18
5.4.00.0100.06015.75
5.3.290.0270.05314.91
5.3.280.0270.05314.67
5.3.270.0130.06014.60
5.3.260.0170.06714.64
5.3.250.0170.05714.84
5.3.240.0430.05314.63
5.3.230.0230.06314.67
5.3.220.0330.04714.63
5.3.210.0300.05314.78
5.3.200.0200.05014.63
5.3.190.0230.05014.63
5.3.180.0170.07314.74
5.3.170.0300.06014.69
5.3.160.0070.06314.62
5.3.150.0400.04014.68
5.3.140.0200.05014.77
5.3.130.0270.05014.78
5.3.120.0130.05714.61
5.3.110.0170.06014.75
5.3.100.0130.05714.18
5.3.90.0130.06014.14
5.3.80.0130.05714.07
5.3.70.0230.04314.02
5.3.60.0270.04014.07
5.3.50.0230.06313.95
5.3.40.0170.07313.99
5.3.30.0100.07013.91
5.3.20.0230.05013.88
5.3.10.0170.04713.69
5.3.00.0230.04313.86
5.2.170.0130.04011.18
5.2.160.0170.04011.14
5.2.150.0230.04711.14
5.2.140.0130.04311.21
5.2.130.0230.03011.23
5.2.120.0100.04311.22
5.2.110.0200.03711.10
5.2.100.0170.04011.14
5.2.90.0170.04011.34
5.2.80.0100.05011.13
5.2.70.0270.03011.15
5.2.60.0200.03711.09
5.2.50.0100.04711.25
5.2.40.0130.04011.13
5.2.30.0030.05011.11
5.2.20.0200.03310.98
5.2.10.0130.04011.05
5.2.00.0070.04310.73
5.1.60.0100.03310.09
5.1.50.0030.04710.12
5.1.40.0170.03010.04
5.1.30.0130.03310.46
5.1.20.0130.05310.39
5.1.10.0070.04710.09
5.1.00.0200.03710.22
5.0.50.0070.0308.55
5.0.40.0030.0308.55
5.0.30.0130.0378.28
5.0.20.0100.0278.25
5.0.10.0070.0338.38
5.0.00.0030.0538.36
4.4.90.0070.0205.91
4.4.80.0100.0175.90
4.4.70.0130.0175.89
4.4.60.0030.0235.88
4.4.50.0100.0175.90
4.4.40.0070.0375.91
4.4.30.0030.0235.87
4.4.20.0070.0205.99
4.4.10.0130.0235.93
4.4.00.0070.0335.91
4.3.110.0070.0205.86
4.3.100.0170.0105.94
4.3.90.0070.0205.80
4.3.80.0130.0275.84
4.3.70.0070.0205.80
4.3.60.0030.0275.79
4.3.50.0030.0235.82
4.3.40.0030.0375.75
4.3.30.0030.0234.58
4.3.20.0070.0204.59
4.3.10.0030.0234.58
4.3.00.0070.0238.74

preferences:
54.67 ms | 400 KiB | 5 Q