3v4l.org

run code in 300+ PHP versions simultaneously
<?php class StringContainer { /** @var array */ public $strings = []; /** * @param array $strings */ public function __construct(array $strings) { $this->strings = $strings; } /** * @return array */ public function getStrings() { return $this->strings; } /* * @return bool */ public function isEqual(StringContainer $container) { return $this->strings == $container->getStrings(); } } $cont = new StringContainer(array("a", "bb", "ccc")); $cont2 = new StringContainer(array("z", "yy", "xxx")); echo "first test: "; var_dump($cont->isEqual($cont2)); echo "\n<br/>second test: "; $cont3 = new StringContainer(array("bb", "a", "ccc")); var_dump($cont->isEqual($cont3));

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.40.0110.00418.84
8.3.30.0030.01019.25
8.3.20.0070.00020.33
8.3.10.0040.00420.40
8.3.00.0040.00419.25
8.2.170.0120.00322.96
8.2.160.0070.00720.52
8.2.150.0070.00024.18
8.2.140.0100.00024.66
8.2.130.0000.00826.16
8.2.120.0040.00420.98
8.2.110.0030.00622.07
8.2.100.0080.00417.72
8.2.90.0040.00419.05
8.2.80.0080.00017.97
8.2.70.0040.00417.63
8.2.60.0030.00517.80
8.2.50.0030.00618.07
8.2.40.0050.00318.12
8.2.30.0070.00419.44
8.2.20.0050.00217.67
8.2.10.0030.00517.91
8.2.00.0040.00417.76
8.1.270.0040.00423.91
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.79
8.1.230.0060.00619.03
8.1.220.0020.00517.74
8.1.210.0000.00818.77
8.1.200.0030.00717.36
8.1.190.0050.00317.35
8.1.180.0080.00018.10
8.1.170.0000.00818.50
8.1.160.0030.00522.02
8.1.150.0040.00418.81
8.1.140.0030.00617.33
8.1.130.0000.00717.88
8.1.120.0040.00417.36
8.1.110.0050.00217.51
8.1.100.0040.00417.45
8.1.90.0070.00017.48
8.1.80.0000.00717.43
8.1.70.0030.00317.32
8.1.60.0000.00817.60
8.1.50.0050.00317.42
8.1.40.0000.00817.55
8.1.30.0000.00817.55
8.1.20.0080.00017.55
8.1.10.0030.00517.46
8.1.00.0050.00217.51
8.0.300.0000.00718.77
8.0.290.0060.00316.88
8.0.280.0070.00018.36
8.0.270.0040.00417.25
8.0.260.0060.00017.18
8.0.250.0000.00717.02
8.0.240.0030.00316.91
8.0.230.0000.00717.07
8.0.220.0040.00416.97
8.0.210.0040.00416.91
8.0.200.0030.00317.02
8.0.190.0000.00717.07
8.0.180.0070.00016.96
8.0.170.0050.00316.91
8.0.160.0070.00016.90
8.0.150.0050.00316.91
8.0.140.0040.00416.84
8.0.130.0000.00513.45
8.0.120.0080.00016.96
8.0.110.0000.00716.93
8.0.100.0040.00416.74
8.0.90.0040.00416.83
8.0.80.0090.01216.88
8.0.70.0000.00817.00
8.0.60.0050.00216.83
8.0.50.0040.00416.93
8.0.30.0130.00816.99
8.0.20.0120.00717.40
8.0.10.0040.00416.87
8.0.00.0080.01016.86
7.4.330.0030.00315.14
7.4.320.0000.00616.48
7.4.300.0070.00016.51
7.4.290.0030.00316.61
7.4.280.0060.00316.61
7.4.270.0000.00616.65
7.4.260.0030.00316.58
7.4.250.0000.00816.48
7.4.240.0040.00316.61
7.4.230.0030.00316.61
7.4.220.0070.01016.71
7.4.210.0070.00716.61
7.4.200.0000.00716.49
7.4.160.0130.01016.47
7.4.150.0060.01217.40
7.4.140.0170.02117.86
7.4.130.0060.01216.61
7.4.120.0070.00916.54
7.4.110.0080.00816.65
7.4.100.0100.00716.63
7.4.90.0130.00316.33
7.4.80.0090.00919.39
7.4.70.0100.01416.27
7.4.60.0070.01016.59
7.4.50.0040.00416.46
7.4.40.0070.00916.41
7.4.30.0060.00916.66
7.4.00.0000.01614.82
7.3.330.0000.00613.16
7.3.320.0030.00313.28
7.3.310.0030.00516.30
7.3.300.0030.00316.30
7.3.290.0070.01116.30
7.3.280.0060.01016.32
7.3.270.0090.00917.40
7.3.260.0150.00316.51
7.3.250.0110.00816.41
7.3.240.0120.00616.38
7.3.230.0070.01516.51
7.3.210.0140.00616.36
7.3.200.0090.00919.39
7.3.190.0060.01216.35
7.3.180.0090.00616.32
7.3.170.0130.00316.37
7.3.160.0080.00816.36
7.3.120.0040.01114.91
7.3.110.0060.00914.58
7.3.100.0030.01114.63
7.3.90.0000.01514.49
7.3.80.0070.00714.50
7.3.70.0090.00314.83
7.3.60.0030.01014.93
7.3.50.0040.00714.66
7.3.40.0030.01014.88
7.3.30.0030.00614.68
7.3.20.0000.01016.48
7.3.10.0070.00716.48
7.3.00.0070.00716.57
7.2.330.0100.00716.55
7.2.320.0030.01616.41
7.2.310.0180.00016.56
7.2.300.0070.01116.47
7.2.290.0130.00316.54
7.2.240.0070.00714.98
7.2.230.0110.00415.04
7.2.220.0000.01314.88
7.2.210.0030.01015.31
7.2.200.0040.01215.23
7.2.190.0040.00414.90
7.2.180.0070.00715.08
7.2.170.0040.01114.89
7.2.160.0040.00715.16
7.2.150.0030.01017.13
7.2.140.0070.00716.80
7.2.130.0070.00717.08
7.2.120.0040.00416.98
7.2.110.0040.00416.97
7.2.100.0000.00816.95
7.2.90.0000.01416.86
7.2.80.0070.00716.68
7.2.70.0080.00416.92
7.2.60.0060.00616.92
7.2.50.0060.01216.80
7.2.40.0030.01017.14
7.2.30.0030.01216.85
7.2.20.0000.01516.85
7.2.10.0070.00716.82
7.2.00.0020.01118.29
7.1.330.0060.00915.77
7.1.320.0040.01115.88
7.1.310.0030.00915.62
7.1.300.0060.00615.77
7.1.290.0030.01015.84
7.1.280.0030.00515.80
7.1.270.0030.01015.91
7.1.260.0070.01015.71
7.1.250.0070.01015.88
7.1.100.0040.00817.90
7.1.70.0000.00817.10
7.1.60.0070.01719.61
7.1.50.0040.00716.63
7.1.00.0070.07322.27
7.0.200.9090.00714.56
7.0.140.0030.07322.10
7.0.60.0130.08019.95
7.0.50.0030.04717.88
7.0.40.0270.05020.02
7.0.30.0400.04720.08
7.0.20.0270.05320.23
7.0.10.0370.07320.12
7.0.00.0100.08320.22
5.6.280.0000.07721.08
5.6.210.0070.07320.54
5.6.200.0100.07318.22
5.6.190.0100.08320.77
5.6.180.0430.06020.39
5.6.170.0270.06320.48
5.6.160.0070.08020.52
5.6.150.0000.04318.16
5.6.140.0070.07318.18
5.6.130.0030.07018.14
5.6.120.0070.08721.01
5.6.110.0070.08320.96
5.6.100.0030.07020.96
5.6.90.0130.07720.98
5.6.80.0070.04020.50
5.6.70.0400.06320.39
5.5.350.0070.07720.41
5.5.340.0070.03718.05
5.5.330.0030.05020.40
5.5.320.0230.06720.30
5.5.310.0230.04020.26
5.5.300.0030.06317.95
5.5.290.0130.07317.95
5.5.280.0030.05020.98
5.5.270.0070.06720.77
5.5.260.0070.06720.76
5.5.250.0070.03720.59
5.5.240.0100.06720.38
5.4.450.0670.03719.39
5.4.440.0170.04719.55
5.4.430.0330.03719.56
5.4.420.0330.03319.65
5.4.410.0270.04019.42
5.4.400.0470.04319.10
5.4.390.0130.04319.21
5.4.380.0300.06718.73
5.4.370.0400.05318.80
5.4.360.0530.05718.47
5.4.350.0370.05318.73
5.4.340.0470.06018.78
5.4.320.0060.05412.51
5.4.310.0090.04912.50
5.4.300.0040.04312.50
5.4.290.0100.04312.50
5.4.280.0060.04212.40
5.4.270.0110.03712.39
5.4.260.0100.04412.40
5.4.250.0090.03912.40
5.4.240.0090.03512.39
5.4.230.0080.04412.39
5.4.220.0080.03612.39
5.4.210.0060.04012.39
5.4.200.0080.03612.39
5.4.190.0090.03512.39
5.4.180.0110.03812.39
5.4.170.0090.03712.40
5.4.160.0080.03912.39
5.4.150.0050.04612.39
5.4.140.0080.03612.08
5.4.130.0100.05612.06
5.4.120.0060.04112.02
5.4.110.0070.04512.02
5.4.100.0050.04812.02
5.4.90.0070.04412.02
5.4.80.0080.03912.02
5.4.70.0100.04212.01
5.4.60.0060.03912.01
5.4.50.0070.03512.02
5.4.40.0040.04112.00
5.4.30.0130.04212.00
5.4.20.0070.03512.00
5.4.10.0020.04012.00
5.4.00.0040.04111.48
5.3.290.0080.03812.80
5.3.280.0090.03612.71
5.3.270.0060.03912.73
5.3.260.0080.04312.72
5.3.250.0060.03712.72
5.3.240.0090.03512.72
5.3.230.0060.03912.71
5.3.220.0070.03712.68
5.3.210.0110.04612.68
5.3.200.0100.03912.68
5.3.190.0090.04412.68
5.3.180.0150.04512.67
5.3.170.0100.04812.67
5.3.160.0110.04412.67
5.3.150.0090.04412.67
5.3.140.0090.05312.66
5.3.130.0090.03812.66
5.3.120.0100.04612.66
5.3.110.0090.04812.66
5.3.100.0050.03812.12
5.3.90.0100.05312.10
5.3.80.0120.04712.09
5.3.70.0060.05212.09
5.3.60.0100.04212.07
5.3.50.0100.05612.02
5.3.40.0100.05012.02
5.3.30.0060.03511.98
5.3.20.0120.04611.76
5.3.10.0080.04611.73
5.3.00.0090.03911.71
5.2.170.0090.0329.21
5.2.160.0050.0359.21
5.2.150.0070.0349.21
5.2.140.0040.0349.21
5.2.130.0040.0319.17
5.2.120.0030.0319.17
5.2.110.0090.0449.18
5.2.100.0080.0339.17
5.2.90.0060.0329.18
5.2.80.0080.0359.17
5.2.70.0070.0329.17
5.2.60.0060.0409.13
5.2.50.0060.0299.10
5.2.40.0050.0369.07
5.2.30.0090.0349.04
5.2.20.0050.0299.04
5.2.10.0060.0268.94
5.2.00.0060.0398.80
5.1.60.0040.0348.09
5.1.50.0070.0308.08
5.1.40.0100.0308.06
5.1.30.0060.0248.41
5.1.20.0090.0398.43
5.1.10.0030.0288.16
5.1.00.0050.0278.16
5.0.50.0030.0216.63
5.0.40.0040.0266.50
5.0.30.0040.0316.30
5.0.20.0050.0186.27
5.0.10.0060.0246.26
5.0.00.0060.0386.25
4.4.90.0030.0204.78
4.4.80.0030.0224.75
4.4.70.0030.0154.75
4.4.60.0040.0144.75
4.4.50.0040.0184.77
4.4.40.0020.0274.71
4.4.30.0010.0184.76
4.4.20.0030.0164.85
4.4.10.0030.0164.85
4.4.00.0020.0274.76
4.3.110.0030.0164.67
4.3.100.0010.0174.67
4.3.90.0020.0164.63
4.3.80.0020.0274.59
4.3.70.0040.0144.63
4.3.60.0030.0154.62
4.3.50.0020.0164.63
4.3.40.0060.0214.54
4.3.30.0010.0173.30
4.3.20.0040.0143.28
4.3.10.0010.0173.23
4.3.00.0030.01313.57

preferences:
79.06 ms | 400 KiB | 5 Q