3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class Contains { /** * @var string */ private $comparedValue; /** * Creates the expression. * * @param string $comparedValue The compared value. */ public function __construct($comparedValue) { $this->comparedValue = $comparedValue; } /** * Returns the accepted suffix. * * @return string The accepted suffix. */ public function getComparedValue() { return $this->comparedValue; } public function equivalentTo(Expression $other) { // Since this class is final, we can check with instanceof return $other instanceof $this && $this->comparedValue == $other->comparedValue; } } $a = new Contains('foobar'); $b = new Contains(0); var_dump($a->equivalentTo($b));

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.70.0120.00318.56
8.3.60.0120.00618.52
8.3.50.0100.01021.25
8.3.40.0090.00618.79
8.3.30.0080.00818.92
8.3.20.0040.00420.16
8.3.10.0080.00021.78
8.3.00.0060.00319.81
8.2.190.0110.00718.54
8.2.180.0150.00016.63
8.2.170.0110.00422.96
8.2.160.0100.00320.31
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0130.00626.16
8.2.120.0000.00817.50
8.2.110.0140.00322.07
8.2.100.0090.00317.75
8.2.90.0080.00019.22
8.2.80.0050.00317.97
8.2.70.0060.00317.63
8.2.60.0030.00617.68
8.2.50.0030.00718.07
8.2.40.0000.00819.52
8.2.30.0060.00319.66
8.2.20.0040.00417.55
8.2.10.0060.00317.98
8.2.00.0040.00418.12
8.1.280.0090.00625.92
8.1.270.0090.00920.38
8.1.260.0080.00026.35
8.1.250.0050.00228.09
8.1.240.0030.00522.05
8.1.230.0050.00517.42
8.1.220.0030.00617.74
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0000.00817.35
8.1.180.0000.00718.10
8.1.170.0040.00418.66
8.1.160.0000.00721.84
8.1.150.0040.00418.84
8.1.140.0000.00917.32
8.1.130.0000.00717.71
8.1.120.0000.00717.48
8.1.110.0000.00717.34
8.1.100.0000.00717.30
8.1.90.0070.00017.50
8.1.80.0000.00717.41
8.1.70.0030.00317.36
8.1.60.0040.00417.50
8.1.50.0060.00317.54
8.1.40.0040.00417.41
8.1.30.0000.00917.58
8.1.20.0000.00717.63
8.1.10.0040.00417.53
8.1.00.0060.00317.38
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0000.00718.40
8.0.270.0000.00717.21
8.0.260.0000.00617.21
8.0.250.0000.00717.01
8.0.240.0040.00417.01
8.0.230.0000.00716.97
8.0.220.0060.00016.78
8.0.210.0000.00716.92
8.0.200.0000.00616.88
8.0.190.0000.00816.88
8.0.180.0040.00416.89
8.0.170.0000.00716.97
8.0.160.0000.00716.89
8.0.150.0080.00016.75
8.0.140.0070.00016.75
8.0.130.0050.00013.34
8.0.120.0030.00616.77
8.0.110.0030.00716.75
8.0.100.0000.00816.79
8.0.90.0000.00716.73
8.0.80.0030.01616.88
8.0.70.0000.00816.93
8.0.60.0040.00416.68
8.0.50.0050.00316.79
8.0.30.0090.00717.20
8.0.20.0140.01017.40
8.0.10.0000.00716.99
8.0.00.0120.00816.68
7.4.330.0060.00015.08
7.4.320.0030.00316.31
7.4.300.0030.00416.62
7.4.290.0040.00416.42
7.4.280.0000.00716.60
7.4.270.0000.00716.62
7.4.260.0040.00416.63
7.4.250.0050.00216.58
7.4.240.0020.00616.59
7.4.230.0030.00316.59
7.4.220.0100.01016.58
7.4.210.0100.00816.60
7.4.200.0030.00316.41
7.4.160.0100.00716.79
7.4.150.0160.00817.40
7.4.140.0070.01017.86
7.4.130.0140.00716.55
7.4.120.0100.00716.54
7.4.110.0090.00916.46
7.4.100.0120.00616.51
7.4.90.0140.00216.45
7.4.80.0030.01519.39
7.4.70.0060.01116.54
7.4.60.0110.00516.54
7.4.50.0030.00616.40
7.4.40.0110.00716.49
7.4.30.0040.01816.75
7.4.00.0070.01014.92
7.3.330.0050.00013.37
7.3.320.0050.00013.24
7.3.310.0030.00316.48
7.3.300.0040.00416.25
7.3.290.0030.00316.25
7.3.280.0050.01316.35
7.3.270.0100.01317.40
7.3.260.0060.01216.46
7.3.250.0110.00516.46
7.3.240.0060.01016.41
7.3.230.0100.00716.39
7.3.210.0100.00716.38
7.3.200.0060.01616.40
7.3.190.0100.01016.45
7.3.180.0080.00716.28
7.3.170.0150.00616.33
7.3.160.0070.01016.43
7.2.330.0090.00916.51
7.2.320.0140.00316.68
7.2.310.0100.00716.76
7.2.300.0030.01416.64
7.2.290.0120.00916.38
7.2.60.0000.01316.81
7.2.00.0060.00619.27
7.1.200.0070.00315.52
7.1.100.0110.00417.63
7.1.70.0030.00717.00
7.1.60.0030.01719.12
7.1.50.0060.00916.77
7.1.00.0100.07022.33
7.0.200.0060.00616.78
7.0.60.0170.04319.78
7.0.50.0100.07717.87
7.0.40.0000.07720.30
7.0.30.0600.06020.07
7.0.20.0230.06020.06
7.0.10.0070.04320.06
7.0.00.0100.08020.22
5.6.280.0100.06720.99
5.6.210.0070.03720.48
5.6.200.0030.05318.18
5.6.190.0030.05320.39
5.6.180.0230.05320.62
5.6.170.0230.04020.55
5.6.160.0100.08020.54
5.6.150.0170.07318.17
5.6.140.0070.03718.24
5.6.130.0100.08018.18
5.6.120.0070.03721.03
5.6.110.0100.08321.07
5.6.100.0070.07321.11
5.6.90.0130.07020.93
5.6.80.0070.08320.38
5.6.70.0230.08320.38
5.5.350.0300.04320.43
5.5.340.0000.04317.93
5.5.330.0070.08020.35
5.5.320.0330.04020.38
5.5.310.0300.06720.27
5.5.300.0070.07717.98
5.5.290.0070.05018.04
5.5.280.0070.08320.78
5.5.270.0030.06020.93
5.5.260.0170.07720.73
5.5.250.0100.08020.69
5.5.240.0200.08320.24
5.4.450.0600.05719.41
5.4.440.0470.05019.30
5.4.430.0230.05319.47
5.4.420.0570.04319.52
5.4.410.0530.05319.57
5.4.400.0600.05319.09
5.4.390.0530.05019.01
5.4.380.0400.05719.02
5.4.370.0470.05319.25
5.4.360.0300.06319.13
5.4.350.0270.05719.29
5.4.340.0530.05018.98
5.4.320.0570.05719.05
5.4.310.0400.04019.25
5.4.300.0400.05719.16
5.4.290.0470.05719.12
5.4.280.0570.05719.14
5.4.270.0730.04718.98
5.4.260.0530.04719.27
5.4.250.0430.05319.09
5.4.240.0270.05319.09
5.4.230.0330.06019.25
5.4.220.0470.05719.14
5.4.210.0530.05319.14
5.4.200.0570.05019.36
5.4.190.0430.05719.26
5.4.180.0430.04019.00
5.4.170.0530.04019.13
5.4.160.0630.04019.25
5.4.150.0500.05319.26
5.4.140.0370.03716.48
5.4.130.0470.05016.51
5.4.120.0470.05016.32
5.4.110.0270.05316.43
5.4.100.0230.05316.19
5.4.90.0330.05016.64
5.4.80.0430.04316.27
5.4.70.0300.06016.49
5.4.60.0300.03016.54
5.4.50.0070.05716.22
5.4.40.0070.06716.48
5.4.30.0030.03016.51
5.4.20.0000.05016.48

preferences:
57.48 ms | 401 KiB | 5 Q