3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 []= 'wello'; $var2 = 'woodbye wruel world'; var_dump(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.0100.01018.43
8.3.50.0100.00722.98
8.3.40.0140.00018.71
8.3.30.0090.00619.02
8.3.20.0050.00320.33
8.3.10.0080.00023.66
8.3.00.0080.00019.13
8.2.180.0040.01116.50
8.2.170.0060.00922.96
8.2.160.0160.00720.39
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0000.00821.03
8.2.110.0140.00722.07
8.2.100.0090.00317.91
8.2.90.0080.00019.27
8.2.80.0080.00018.05
8.2.70.0060.00317.63
8.2.60.0050.00317.93
8.2.50.0040.00418.10
8.2.40.0040.00420.64
8.2.30.0040.00419.25
8.2.20.0040.00417.65
8.2.10.0000.00718.16
8.2.00.0060.00317.73
8.1.280.0000.01525.92
8.1.270.0060.00323.80
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00620.76
8.1.230.0090.00322.75
8.1.220.0070.00017.79
8.1.210.0040.00418.77
8.1.200.0060.00317.48
8.1.190.0000.00917.39
8.1.180.0030.00618.10
8.1.170.0030.00618.72
8.1.160.0040.00418.82
8.1.150.0040.00418.90
8.1.140.0000.00717.52
8.1.130.0000.00717.94
8.1.120.0040.00417.53
8.1.110.0090.00017.50
8.1.100.0090.00017.38
8.1.90.0040.00417.43
8.1.80.0080.00017.35
8.1.70.0070.00017.46
8.1.60.0040.00417.51
8.1.50.0060.00317.48
8.1.40.0080.00017.41
8.1.30.0000.00917.65
8.1.20.0040.00417.54
8.1.10.0040.00417.55
8.1.00.0050.00317.33
8.0.300.0000.00819.96
8.0.290.0060.00316.75
8.0.280.0000.00718.45
8.0.270.0030.00317.26
8.0.260.0030.00317.25
8.0.250.0030.00317.02
8.0.240.0040.00416.93
8.0.230.0000.00716.92
8.0.220.0040.00416.96
8.0.210.0000.00716.96
8.0.200.0060.00016.83
8.0.190.0000.00716.96
8.0.180.0000.00816.86
8.0.170.0030.00517.01
8.0.160.0070.00017.01
8.0.150.0030.00316.82
8.0.140.0030.00516.81
8.0.130.0000.00513.32
8.0.120.0000.00716.77
8.0.110.0000.00716.96
8.0.100.0050.00216.72
8.0.90.0000.00716.77
8.0.80.0120.00916.85
8.0.70.0070.00016.80
8.0.60.0070.00016.77
8.0.50.0040.00416.95
8.0.30.0050.01417.15
8.0.20.0110.01117.40
8.0.10.0050.00316.88
8.0.00.0020.01516.80
7.4.330.0020.00215.00
7.4.320.0030.00316.46
7.4.300.0030.00316.60
7.4.290.0070.00016.61
7.4.280.0000.00716.63
7.4.270.0070.00016.52
7.4.260.0000.00716.50
7.4.250.0040.00416.55
7.4.240.0030.00416.54
7.4.230.0000.00816.43
7.4.220.0120.00916.72
7.4.210.0090.00616.61
7.4.200.0000.00816.63
7.4.160.0060.00916.59
7.4.150.0090.00917.40
7.4.140.0100.00717.86
7.4.130.0060.01016.51
7.4.120.0160.00316.42
7.4.110.0130.00316.47
7.4.100.0100.00716.67
7.4.90.0090.00916.59
7.4.80.0090.01219.39
7.4.70.0100.00716.56
7.4.60.0060.01116.33
7.4.50.0020.00216.39
7.4.40.0190.00016.59
7.4.30.0130.00316.38
7.4.00.0080.00814.93
7.3.330.0050.00013.28
7.3.320.0050.00013.16
7.3.310.0040.00416.33
7.3.300.0000.00716.21
7.3.290.0100.00316.26
7.3.280.0090.00816.29
7.3.270.0070.01017.40
7.3.260.0090.00916.55
7.3.250.0060.01116.44
7.3.240.0100.00716.52
7.3.230.0080.01216.39
7.3.210.0060.01116.54
7.3.200.0120.00419.39
7.3.190.0070.01016.55
7.3.180.0090.00616.47
7.3.170.0000.01716.50
7.3.160.0050.01316.56
7.3.10.0030.00916.62
7.3.00.0030.00916.64
7.2.330.0100.00716.64
7.2.320.0060.00916.59
7.2.310.0030.01516.51
7.2.300.0090.00916.37
7.2.290.0080.00816.62
7.2.130.0140.00316.64
7.2.120.0040.00716.87
7.2.110.0090.00316.82
7.2.100.0100.00316.87
7.2.90.0090.00616.73
7.2.80.0040.01116.79
7.2.70.0070.00316.97
7.2.60.0030.00916.97
7.2.50.0030.00916.85
7.2.40.0060.00616.51
7.2.30.0090.00317.04
7.2.20.0070.00716.73
7.2.10.0000.01217.09
7.2.00.0060.00316.86
7.1.250.0040.00815.59
7.1.70.0130.00017.21
7.1.60.0040.00817.28
7.1.50.0170.00716.66
7.1.00.0170.06322.48
7.0.200.0000.01416.78
7.0.140.0030.07322.15
7.0.60.0170.07720.09
7.0.50.0070.03717.90
7.0.40.0230.06720.23
7.0.30.0270.07320.24
7.0.20.0230.06020.23
7.0.10.0170.07020.13
7.0.00.0070.06320.23
5.6.210.0130.06020.68
5.6.200.0130.07318.16
5.6.190.0170.08320.48
5.6.180.0230.05020.56
5.6.170.0170.04320.71
5.6.160.0000.04320.46
5.6.150.0100.04318.15
5.6.140.0030.05718.11
5.6.130.0130.08018.21
5.6.120.0200.06721.02
5.6.110.0130.09320.99
5.6.100.0230.07021.11
5.6.90.0000.04321.13
5.6.80.0070.07720.51
5.5.350.0170.08020.36
5.5.340.0030.04317.96
5.5.330.0030.04320.29
5.5.320.0170.04320.35
5.5.310.0230.07320.19
5.5.300.0070.08317.97
5.5.290.0070.08018.07
5.5.280.0130.06020.88
5.5.270.0130.08320.84
5.5.260.0100.08320.89
5.5.250.0100.07720.63
5.5.240.0370.06720.26
5.4.450.0170.04019.57
5.4.440.0130.03319.59
5.4.430.0170.04019.18
5.4.420.0300.03719.20
5.4.410.0430.04019.07
5.4.400.0270.04719.08
5.4.390.0800.04019.31
5.4.380.0470.05718.78
5.4.370.0270.05718.77
5.4.360.0400.04018.77
5.4.350.0370.05318.72
5.4.340.0200.06018.50
5.4.320.0050.03812.50
5.4.310.0080.03712.50
5.4.300.0060.03712.50
5.4.290.0110.03712.50
5.4.280.0040.04012.40
5.4.270.0030.03912.40
5.4.260.0030.04112.40
5.4.250.0060.03712.39
5.4.240.0050.03712.40
5.4.230.0090.03512.39
5.4.220.0040.03912.39
5.4.210.0080.03212.39
5.4.200.0050.03812.39
5.4.190.0040.03712.39
5.4.180.0040.03812.39
5.4.170.0070.03512.39
5.4.160.0080.03412.39
5.4.150.0020.03912.38
5.4.140.0070.04512.07
5.4.130.0090.03212.06
5.4.120.0030.03712.01
5.4.110.0050.03612.01
5.4.100.0100.03112.02
5.4.90.0050.03712.01
5.4.80.0050.03712.02
5.4.70.0050.03512.01
5.4.60.0060.03412.01
5.4.50.0070.03412.01
5.4.40.0070.03412.00
5.4.30.0060.03811.99
5.4.20.0040.03711.99
5.4.10.0080.03212.00
5.4.00.0040.03811.48
5.3.290.0050.04112.80
5.3.280.0060.03812.71
5.3.270.0070.03812.73
5.3.260.0050.03912.72
5.3.250.0040.04012.72
5.3.240.0060.03712.72
5.3.230.0050.03912.71
5.3.220.0060.03712.68
5.3.210.0060.03812.68
5.3.200.0030.03912.68
5.3.190.0060.03712.68
5.3.180.0070.03612.67
5.3.170.0060.03612.67
5.3.160.0040.04012.67
5.3.150.0060.03712.67
5.3.140.0060.03712.66
5.3.130.0070.03712.66
5.3.120.0060.03912.66
5.3.110.0030.04212.66
5.3.100.0040.03912.12
5.3.90.0060.03612.10
5.3.80.0050.03712.09
5.3.70.0070.03512.09
5.3.60.0060.04312.07
5.3.50.0090.03412.02
5.3.40.0060.03612.03
5.3.30.0070.03411.98
5.3.20.0060.03511.76
5.3.10.0070.03411.73
5.3.00.0070.04011.71
5.2.170.0070.0309.22
5.2.160.0050.0309.21
5.2.150.0050.0329.22
5.2.140.0070.0299.21
5.2.130.0040.0319.18
5.2.120.0050.0299.17
5.2.110.0050.0349.18
5.2.100.0040.0309.17
5.2.90.0060.0279.17
5.2.80.0030.0329.17
5.2.70.0050.0309.17
5.2.60.0060.0299.13
5.2.50.0070.0399.09
5.2.40.0040.0299.07
5.2.30.0050.0299.04
5.2.20.0050.0329.03
5.2.10.0050.0288.94
5.2.00.0040.0298.80
5.1.60.0070.0218.09
5.1.50.0040.0258.08
5.1.40.0040.0248.06
5.1.30.0040.0278.41
5.1.20.0050.0278.44
5.1.10.0040.0278.16
5.1.00.0050.0258.16
5.0.50.0090.0156.64
5.0.40.0040.0196.50
5.0.30.0050.0306.32
5.0.20.0020.0216.28
5.0.10.0050.0186.26
5.0.00.0040.0306.25
4.4.90.0040.0184.78
4.4.80.0040.0214.75
4.4.70.0030.0164.75
4.4.60.0030.0154.75
4.4.50.0060.0124.77
4.4.40.0050.0234.71
4.4.30.0020.0164.76
4.4.20.0040.0154.84
4.4.10.0020.0164.84
4.4.00.0020.0294.75
4.3.110.0020.0164.67
4.3.100.0030.0204.66
4.3.90.0050.0124.64
4.3.80.0030.0274.58
4.3.70.0010.0164.63
4.3.60.0030.0144.63
4.3.50.0020.0164.63
4.3.40.0010.0254.54
4.3.30.0030.0153.30
4.3.20.0010.0173.28
4.3.10.0030.0153.25
4.3.00.0000.02018.23

preferences:
59.29 ms | 401 KiB | 5 Q