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_NOT, '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.0110.00718.43
8.3.50.0140.00318.05
8.3.40.0090.00618.51
8.3.30.0070.00718.82
8.3.20.0050.00220.39
8.3.10.0000.00821.73
8.3.00.0040.00419.19
8.2.180.0150.00916.63
8.2.170.0110.00822.96
8.2.160.0210.00022.22
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00419.63
8.2.110.0060.00322.27
8.2.100.0120.00019.39
8.2.90.0040.00419.28
8.2.80.0000.00817.97
8.2.70.0060.00317.38
8.2.60.0080.00017.91
8.2.50.0000.00818.07
8.2.40.0000.00819.72
8.2.30.0060.00318.11
8.2.20.0080.00017.69
8.2.10.0040.00418.05
8.2.00.0060.00317.63
8.1.280.0090.00625.92
8.1.270.0080.00018.83
8.1.260.0040.01526.35
8.1.250.0000.00728.09
8.1.240.0030.00623.77
8.1.230.0080.00418.98
8.1.220.0040.00417.74
8.1.210.0000.00918.77
8.1.200.0060.00317.25
8.1.190.0080.00017.23
8.1.180.0040.00418.10
8.1.170.0000.01018.35
8.1.160.0000.00721.91
8.1.150.0050.00218.85
8.1.140.0000.00817.32
8.1.130.0070.00017.85
8.1.120.0040.00417.41
8.1.110.0050.00317.42
8.1.100.0040.00417.42
8.1.90.0000.00717.40
8.1.80.0030.00417.29
8.1.70.0000.00817.52
8.1.60.0060.00317.53
8.1.50.0040.00417.61
8.1.40.0050.00317.52
8.1.30.0000.00817.56
8.1.20.0040.00417.66
8.1.10.0000.00817.54
8.1.00.0000.00817.46
8.0.300.0000.00718.77
8.0.290.0040.00416.58
8.0.280.0030.00318.30
8.0.270.0030.00517.12
8.0.260.0030.00317.14
8.0.250.0030.00316.91
8.0.240.0030.00316.92
8.0.230.0020.00516.87
8.0.220.0000.00716.85
8.0.210.0050.00316.84
8.0.200.0040.00416.89
8.0.190.0000.00816.94
8.0.180.0000.00716.77
8.0.170.0040.00416.84
8.0.160.0020.00516.87
8.0.150.0000.00716.81
8.0.140.0040.00416.76
8.0.130.0050.00013.21
8.0.120.0040.00416.73
8.0.110.0000.00816.77
8.0.100.0030.00516.83
8.0.90.0040.00416.86
8.0.80.0090.00616.77
8.0.70.0000.00816.79
8.0.60.0000.00716.80
8.0.50.0000.00716.89
8.0.30.0050.01717.04
8.0.20.0110.01117.40
8.0.10.0000.00717.01
8.0.00.0090.00816.79
7.4.330.0050.00015.03
7.4.320.0000.00716.52
7.4.300.0030.00316.61
7.4.290.0000.00716.50
7.4.280.0000.00716.43
7.4.270.0070.00016.62
7.4.260.0050.00216.49
7.4.250.0000.00716.55
7.4.240.0020.00516.59
7.4.230.0030.00316.71
7.4.220.0090.00916.59
7.4.210.0090.00616.52
7.4.200.0000.00816.40
7.4.160.0090.00616.66
7.4.150.0090.00917.40
7.4.140.0050.01117.86
7.4.130.0100.00716.37
7.4.120.0120.00616.54
7.4.110.0090.00916.38
7.4.100.0080.01116.38
7.4.90.0150.00316.44
7.4.80.0030.01619.39
7.4.70.0080.01416.61
7.4.60.0170.00016.42
7.4.50.0030.00516.12
7.4.40.0040.01216.25
7.4.30.0150.00616.29
7.4.00.0090.00514.75
7.3.330.0000.00613.14
7.3.320.0000.00513.34
7.3.310.0000.00816.29
7.3.300.0000.00716.20
7.3.290.0060.00816.29
7.3.280.0090.00816.34
7.3.270.0110.00817.40
7.3.260.0110.00716.37
7.3.250.0170.00316.36
7.3.240.0110.00516.52
7.3.230.0070.01016.39
7.3.210.0070.01116.46
7.3.200.0110.00719.39
7.3.190.0160.00416.35
7.3.180.0110.00716.31
7.3.170.0070.01516.59
7.3.160.0130.00516.43
7.3.120.0060.01414.62
7.3.110.0030.01314.68
7.3.100.0040.00814.48
7.3.90.0040.01114.68
7.3.80.0030.01214.95
7.3.70.0000.01114.74
7.3.60.0110.00414.77
7.3.50.0060.00914.98
7.3.40.0060.00614.52
7.3.30.0060.00614.89
7.3.20.0060.00616.78
7.3.10.0070.01116.69
7.3.00.0070.01016.65
7.2.330.0030.01516.62
7.2.320.0070.01016.66
7.2.310.0090.00916.55
7.2.300.0150.00416.52
7.2.290.0110.00716.73
7.2.250.0090.00915.06
7.2.240.0120.00615.12
7.2.230.0130.00015.14
7.2.220.0050.00515.04
7.2.210.0100.00614.59
7.2.200.0120.00015.10
7.2.190.0070.01014.90
7.2.180.0060.00615.03
7.2.170.0090.00315.12
7.2.60.0030.01217.00
7.2.00.0060.00619.37
7.1.330.0070.00715.90
7.1.320.0040.01115.91
7.1.310.0000.01315.48
7.1.300.0070.01015.82
7.1.290.0030.01015.59
7.1.280.0060.00915.82
7.1.270.0060.00615.52
7.1.260.0000.01415.69
7.1.200.0060.00615.52
7.1.100.0040.01118.01
7.1.70.0000.01017.03
7.1.60.0180.00719.46
7.1.50.0090.00616.89
7.1.00.0000.08022.31
7.0.200.0340.00316.67
7.0.140.0030.03321.95
7.0.60.0030.08719.93
7.0.50.0130.04717.98
7.0.40.0030.04719.96
7.0.30.0200.06320.10
7.0.20.0170.05320.19
7.0.10.0070.08320.18
7.0.00.0100.07720.16
5.6.280.0000.07721.12
5.6.210.0030.07020.76
5.6.200.0070.03718.19
5.6.190.0100.04320.47
5.6.180.0400.08020.60
5.6.170.0170.04720.53
5.6.160.0070.08720.55
5.6.150.0100.08018.29
5.6.140.0100.04718.18
5.6.130.0000.06318.12
5.6.120.0030.05720.99
5.6.110.0100.08321.02
5.6.100.0030.04020.98
5.6.90.0130.07321.12
5.6.80.0030.07020.41
5.5.350.0200.08020.45
5.5.340.0070.07318.05
5.5.330.0070.08320.27
5.5.320.0370.06020.20
5.5.310.0130.04720.37
5.5.300.0070.03717.93
5.5.290.0070.06318.03
5.5.280.0100.08320.75
5.5.270.0070.06720.89
5.5.260.0000.04320.65
5.5.250.0070.04720.52
5.5.240.0070.07320.29
5.4.450.0570.06319.50
5.4.440.0630.05019.30
5.4.430.0070.05719.41
5.4.420.0170.04719.21
5.4.410.0200.04319.08
5.4.400.0030.06018.55
5.4.390.0230.04718.75
5.4.380.0230.06018.84
5.4.370.0200.05318.78
5.4.360.0130.06018.77
5.4.350.0130.06318.48
5.4.340.0270.05318.74
5.4.320.0200.05018.81
5.4.310.0200.06318.56
5.4.300.0170.05718.75
5.4.290.0100.06018.80
5.4.280.0230.04718.57
5.4.270.0270.07018.50
5.4.260.0270.06718.58
5.4.250.0330.06018.77
5.4.240.0200.05718.58
5.4.230.0270.04718.71
5.4.220.0200.05718.74
5.4.210.0130.06318.56
5.4.200.0230.06716.57
5.4.190.0270.04718.73
5.4.180.0400.05018.46
5.4.170.0330.04718.46
5.4.160.0270.05018.73
5.4.150.0200.05318.72
5.4.140.0130.05316.34
5.4.130.0200.04716.27
5.4.120.0230.04716.45
5.4.110.0230.05016.22
5.4.100.0170.05716.46
5.4.90.0300.05016.21
5.4.80.0200.05316.38
5.4.70.0370.06316.24
5.4.60.0170.07716.28
5.4.50.0330.06316.41
5.4.40.0470.06316.25
5.4.30.0300.05716.18
5.4.20.0270.07316.46
5.4.10.0470.07016.14
5.4.00.0430.05015.72
5.3.290.0300.06714.68
5.3.280.0530.05714.64
5.3.270.0530.07314.65
5.3.260.0200.08014.64
5.3.250.0300.06714.75
5.3.240.0270.05014.64
5.3.230.0270.05314.66
5.3.220.0330.05014.64
5.3.210.0170.06714.56
5.3.200.0230.06014.77
5.3.190.0370.05314.76
5.3.180.0400.06014.57
5.3.170.0370.06314.60
5.3.160.0370.05714.63
5.3.150.0430.05314.79
5.3.140.0170.06314.79
5.3.130.0230.07314.78
5.3.120.0300.06014.67
5.3.110.0370.06714.66
5.3.100.0230.06714.11
5.3.90.0230.06714.05
5.3.80.0270.06014.15
5.3.70.0300.05014.06
5.3.60.0330.05314.04
5.3.50.0470.05014.03
5.3.40.0270.05314.17
5.3.30.0270.06014.05
5.3.20.0430.03713.89
5.3.10.0400.04013.83
5.3.00.0100.06013.78
5.2.170.0070.05011.20
5.2.160.0230.05011.20
5.2.150.0170.04311.38
5.2.140.0200.03711.36
5.2.130.0300.04311.22
5.2.120.0270.04311.21
5.2.110.0300.04711.23
5.2.100.0100.05011.34
5.2.90.0170.05011.22
5.2.80.0200.04311.24
5.2.70.0170.05011.21
5.2.60.0100.05011.08
5.2.50.0130.04711.08
5.2.40.0130.04011.21
5.2.30.0200.03711.03
5.2.20.0130.04011.11
5.2.10.0230.03010.89
5.2.00.0200.04010.84
5.1.60.0170.03710.12
5.1.50.0130.05310.05
5.1.40.0130.05010.07
5.1.30.0230.04310.55
5.1.20.0130.05310.37
5.1.10.0070.04310.28
5.1.00.0170.04010.27
5.0.50.0130.0238.66
5.0.40.0230.0238.56
5.0.30.0170.0438.36
5.0.20.0100.0278.20
5.0.10.0070.0308.29
5.0.00.0100.0438.13
4.4.90.0200.0105.89
4.4.80.0030.0305.88
4.4.70.0130.0175.96
4.4.60.0030.0275.87
4.4.50.0100.0235.88
4.4.40.0170.0335.96
4.4.30.0030.0235.87
4.4.20.0130.0136.02
4.4.10.0130.0206.07
4.4.00.0100.0305.91
4.3.110.0130.0175.84
4.3.100.0070.0235.80
4.3.90.0070.0205.79
4.3.80.0000.0435.89
4.3.70.0070.0235.79
4.3.60.0130.0175.81
4.3.50.0030.0305.91
4.3.40.0130.0405.75
4.3.30.0030.0234.58
4.3.20.0000.0304.58
4.3.10.0030.0274.58
4.3.00.0130.0176.78

preferences:
40.6 ms | 400 KiB | 5 Q