3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 []= 'wello'; $var2 = 'woodbye wruel world'; poor_mans_strcmp($var2, $var2); function poor_mans_strcmp($str1, $str2) { $result = 0; $str3 = 'a' . $str1; $str4 = 'a' . $str2; if ($str3 < $str4) { $result = 1; } if ($str3 > $str4) { $result = -1; } return $result; }

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.0090.00618.68
8.3.50.0090.01123.00
8.3.40.0110.00418.87
8.3.30.0070.00718.85
8.3.20.0040.00420.35
8.3.10.0000.00823.61
8.3.00.0040.00419.25
8.2.180.0060.00916.63
8.2.170.0090.00922.96
8.2.160.0070.00720.14
8.2.150.0050.00324.18
8.2.140.0050.00224.66
8.2.130.0040.00426.16
8.2.120.0040.00421.10
8.2.110.0060.00320.39
8.2.100.0040.00818.16
8.2.90.0050.00319.22
8.2.80.0050.00317.97
8.2.70.0000.01017.38
8.2.60.0040.00418.05
8.2.50.0040.00418.07
8.2.40.0040.00418.34
8.2.30.0040.00418.13
8.2.20.0030.00617.74
8.2.10.0040.00418.04
8.2.00.0040.00417.67
8.1.280.0070.01125.92
8.1.270.0040.00423.88
8.1.260.0050.00226.35
8.1.250.0070.00028.09
8.1.240.0060.00321.89
8.1.230.0080.00419.00
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00917.23
8.1.190.0060.00317.22
8.1.180.0090.00018.10
8.1.170.0030.00618.62
8.1.160.0030.00321.97
8.1.150.0000.00718.91
8.1.140.0000.00817.33
8.1.130.0020.00517.86
8.1.120.0000.00817.44
8.1.110.0040.00417.32
8.1.100.0080.00017.51
8.1.90.0040.00417.46
8.1.80.0030.00317.38
8.1.70.0040.00417.43
8.1.60.0040.00417.60
8.1.50.0060.00317.42
8.1.40.0030.00617.55
8.1.30.0050.00317.61
8.1.20.0040.00417.55
8.1.10.0000.00717.44
8.1.00.0040.00417.42
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0030.00318.48
8.0.270.0030.00317.27
8.0.260.0060.00017.17
8.0.250.0030.00316.97
8.0.240.0060.00316.95
8.0.230.0030.00516.92
8.0.220.0040.00416.79
8.0.210.0000.00716.96
8.0.200.0030.00316.84
8.0.190.0000.00817.04
8.0.180.0040.00416.85
8.0.170.0000.00716.98
8.0.160.0050.00216.79
8.0.150.0000.00716.73
8.0.140.0000.00716.75
8.0.130.0030.00313.25
8.0.120.0000.00716.90
8.0.110.0000.00716.92
8.0.100.0000.00816.73
8.0.90.0000.00716.86
8.0.80.0050.01016.84
8.0.70.0000.00816.71
8.0.60.0040.00416.70
8.0.50.0030.00516.90
8.0.30.0110.01016.95
8.0.20.0120.00917.40
8.0.10.0070.00016.89
8.0.00.0060.01116.76
7.4.330.0000.00515.03
7.4.320.0030.00316.53
7.4.300.0030.00316.65
7.4.290.0000.00816.49
7.4.280.0030.00616.59
7.4.270.0000.00716.59
7.4.260.0030.00316.38
7.4.250.0050.00216.48
7.4.240.0040.00316.58
7.4.230.0030.00616.70
7.4.220.0100.00716.45
7.4.210.0060.01316.55
7.4.200.0070.00016.39
7.4.160.0110.00416.47
7.4.150.0090.00917.40
7.4.140.0120.00517.86
7.4.130.0050.01216.68
7.4.120.0100.00716.57
7.4.110.0110.00616.61
7.4.100.0070.01016.55
7.4.90.0060.01816.59
7.4.80.0100.00619.39
7.4.70.0090.00916.33
7.4.60.0100.00716.40
7.4.50.0000.00416.48
7.4.40.0060.01316.58
7.4.30.0090.00716.57
7.4.00.0070.01015.03
7.3.330.0050.00013.38
7.3.320.0000.00713.38
7.3.310.0030.00316.13
7.3.300.0060.00016.35
7.3.290.0070.00716.28
7.3.280.0050.01316.30
7.3.270.0120.00617.40
7.3.260.0090.00916.43
7.3.250.0130.00716.52
7.3.240.0040.01416.30
7.3.230.0120.00616.39
7.3.210.0060.01216.24
7.3.200.0200.00319.39
7.3.190.0070.01016.32
7.3.180.0070.00816.32
7.3.170.0100.01316.39
7.3.160.0090.00616.48
7.3.120.0070.01015.05
7.3.110.0100.00714.84
7.3.100.0070.01014.88
7.3.90.0070.00314.85
7.3.80.0000.00914.98
7.3.70.0030.00614.78
7.3.60.0030.01014.80
7.3.50.0070.00314.80
7.3.40.0030.00814.55
7.3.30.0030.00914.71
7.3.20.0040.01116.72
7.3.10.0070.00716.64
7.3.00.0040.00716.77
7.2.330.0110.00716.76
7.2.320.0100.00716.47
7.2.310.0070.01016.69
7.2.300.0100.01016.63
7.2.290.0100.00716.77
7.2.250.0100.00715.19
7.2.240.0030.01214.96
7.2.230.0090.00614.52
7.2.220.0000.00915.00
7.2.210.0070.00714.93
7.2.200.0030.00715.04
7.2.190.0030.00715.04
7.2.180.0040.00814.92
7.2.170.0040.01114.80
7.2.00.0100.01019.24
7.1.330.0070.00715.72
7.1.320.0060.00615.75
7.1.310.0000.00916.02
7.1.300.0060.00815.68
7.1.290.0040.00415.92
7.1.280.0000.00915.78
7.1.270.0030.01315.82
7.1.260.0040.00815.73
7.1.200.0130.00315.83
7.1.100.0190.01017.83
7.1.70.0060.00317.22
7.1.60.0030.00717.29
7.1.50.0040.01816.92
7.1.00.0100.06722.54
7.0.200.0000.01016.78
7.0.140.0030.07322.00
7.0.60.0000.05719.92
7.0.50.0100.03717.88
7.0.40.0030.05720.23
7.0.30.0200.04720.08
7.0.20.0170.04720.06
7.0.10.0070.08720.19
7.0.00.0030.08720.07
5.6.280.0130.06321.13
5.6.210.0070.05720.53
5.6.200.0170.07018.29
5.6.190.0170.06320.33
5.6.180.0200.05320.67
5.6.170.0170.04020.52
5.6.160.0030.08720.44
5.6.150.0000.04318.23
5.6.140.0130.07718.12
5.6.130.0000.06718.15
5.6.120.0130.08021.16
5.6.110.0130.04320.90
5.6.100.0070.08020.97
5.6.90.0070.06320.99
5.6.80.0200.07020.41
5.6.70.1700.03720.50
5.5.350.0130.08020.43
5.5.340.0070.06318.05
5.5.330.0100.08320.37
5.5.320.0100.05320.35
5.5.310.0300.04020.35
5.5.300.0100.05717.99
5.5.290.0070.07718.02
5.5.280.0070.05020.68
5.5.270.0030.06020.77
5.5.260.0070.04320.87
5.5.250.0070.05320.69
5.5.240.0130.05720.26
5.4.450.0170.04319.17
5.4.440.0170.04319.27
5.4.430.0070.04019.47
5.4.420.0500.04719.64
5.4.410.0300.04019.07
5.4.400.0230.04019.16
5.4.390.0170.04019.24
5.4.380.0330.07718.70
5.4.370.0430.05018.82
5.4.360.0400.06318.59
5.4.350.0530.05018.79
5.4.340.0600.05718.74
5.4.320.0090.03612.51
5.4.310.0060.05312.50
5.4.300.0060.03712.51
5.4.290.0040.04112.50
5.4.280.0070.03512.39
5.4.270.0060.03812.40
5.4.260.0070.03712.40
5.4.250.0070.03712.40
5.4.240.0060.03612.40
5.4.230.0070.03712.39
5.4.220.0070.03512.39
5.4.210.0060.04012.39
5.4.200.0070.03612.39
5.4.190.0060.03612.38
5.4.180.0060.03612.38
5.4.170.0040.03712.40
5.4.160.0060.03612.39
5.4.150.0070.03512.39
5.4.140.0070.03712.07
5.4.130.0050.05012.06
5.4.120.0130.04212.02
5.4.110.0060.03612.02
5.4.100.0030.03812.02
5.4.90.0070.03512.02
5.4.80.0080.03412.02
5.4.70.0050.03512.01
5.4.60.0050.03412.01
5.4.50.0030.03712.01
5.4.40.0050.03512.00
5.4.30.0070.03311.99
5.4.20.0040.03711.99
5.4.10.0050.03511.99
5.4.00.0020.03911.48
5.3.290.0030.04212.80
5.3.280.0120.03212.71
5.3.270.0050.03912.72
5.3.260.0050.04112.71
5.3.250.0040.03812.72
5.3.240.0040.03812.71
5.3.230.0050.03712.71
5.3.220.0080.03512.68
5.3.210.0060.04012.68
5.3.200.0080.03412.68
5.3.190.0030.04212.68
5.3.180.0060.03612.68
5.3.170.0070.03712.67
5.3.160.0080.03512.67
5.3.150.0030.04012.67
5.3.140.0060.03612.66
5.3.130.0100.03412.66
5.3.120.0050.03912.66
5.3.110.0070.03712.66
5.3.100.0040.03812.12
5.3.90.0040.03712.10
5.3.80.0020.04412.09
5.3.70.0080.03512.09
5.3.60.0060.04212.07
5.3.50.0070.03512.02
5.3.40.0090.03312.02
5.3.30.0090.03611.98
5.3.20.0040.03511.76
5.3.10.0050.03511.73
5.3.00.0050.03711.71
5.2.170.0010.0349.21
5.2.160.0070.0279.22
5.2.150.0070.0299.21
5.2.140.0040.0319.21
5.2.130.0060.0279.18
5.2.120.0040.0289.17
5.2.110.0030.0309.18
5.2.100.0040.0309.17
5.2.90.0020.0329.17
5.2.80.0050.0299.17
5.2.70.0070.0279.17
5.2.60.0020.0329.13
5.2.50.0050.0309.09
5.2.40.0060.0329.07
5.2.30.0060.0399.05
5.2.20.0040.0329.03
5.2.10.0020.0308.94
5.2.00.0050.0348.80
5.1.60.0100.0238.09
5.1.50.0080.0298.08
5.1.40.0050.0328.06
5.1.30.0050.0308.41
5.1.20.0050.0268.43
5.1.10.0040.0268.16
5.1.00.0060.0258.16
5.0.50.0060.0186.63
5.0.40.0020.0216.50
5.0.30.0040.0306.31
5.0.20.0030.0196.28
5.0.10.0020.0216.26
5.0.00.0020.0326.25
4.4.90.0020.0164.78
4.4.80.0050.0134.75
4.4.70.0040.0144.76
4.4.60.0030.0154.75
4.4.50.0030.0154.77
4.4.40.0030.0254.71
4.4.30.0030.0154.76
4.4.20.0010.0174.84
4.4.10.0030.0154.85
4.4.00.0020.0264.76
4.3.110.0040.0154.67
4.3.100.0030.0154.66
4.3.90.0020.0154.64
4.3.80.0020.0254.58
4.3.70.0020.0154.63
4.3.60.0040.0134.63
4.3.50.0030.0154.63
4.3.40.0050.0214.54
4.3.30.0010.0173.30
4.3.20.0000.0183.29
4.3.10.0010.0173.25
4.3.00.0170.01718.23

preferences:
41.15 ms | 401 KiB | 5 Q