3v4l.org

run code in 300+ PHP versions simultaneously
<?php $code = "-\r-\r\n-\n-"; $hex = bin2hex($code); var_dump($hex); $code1 = str_replace("\r\n", "\n", $code); $hex = bin2hex($code1); var_dump($hex); $code2 = str_replace(array("\r\n", "\r"), "\n", $code); $hex = bin2hex($code2); var_dump($hex); $code3 = strtr($code, array( "\r\n" => "\n", "\r" => "\n" )); $hex = bin2hex($code3); var_dump($hex);

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.0170.00318.28
8.3.50.0140.00017.93
8.3.40.0110.00418.49
8.3.30.0070.00718.95
8.3.20.0030.00620.21
8.3.10.0080.00023.48
8.3.00.0080.00018.98
8.2.180.0150.00016.38
8.2.170.0140.00722.96
8.2.160.0070.00722.21
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00421.07
8.2.110.0060.00320.94
8.2.100.0060.00617.75
8.2.90.0050.00317.70
8.2.80.0000.00817.97
8.2.70.0050.00317.38
8.2.60.0030.00518.04
8.2.50.0060.00318.07
8.2.40.0040.00417.92
8.2.30.0030.00617.87
8.2.20.0080.00017.52
8.2.10.0080.00018.05
8.2.00.0040.00417.58
8.1.280.0140.00025.92
8.1.270.0090.00018.71
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00722.65
8.1.230.0080.00320.88
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0070.00317.10
8.1.190.0080.00017.10
8.1.180.0040.00718.10
8.1.170.0060.00318.46
8.1.160.0040.00421.98
8.1.150.0000.00718.86
8.1.140.0030.00519.05
8.1.130.0040.00417.73
8.1.120.0070.00017.29
8.1.110.0050.00317.38
8.1.100.0030.00517.25
8.1.90.0000.00717.45
8.1.80.0070.00017.38
8.1.70.0030.00317.26
8.1.60.0030.00617.57
8.1.50.0000.00817.45
8.1.40.0070.00017.50
8.1.30.0030.00617.55
8.1.20.0000.00817.63
8.1.10.0000.00717.45
8.1.00.0000.00817.38
8.0.300.0000.00719.89
8.0.290.0000.00816.63
8.0.280.0030.00318.24
8.0.270.0000.00717.19
8.0.260.0000.00617.19
8.0.250.0030.00316.91
8.0.240.0000.00816.86
8.0.230.0030.00316.92
8.0.220.0040.00416.75
8.0.210.0000.00716.78
8.0.200.0040.00416.88
8.0.190.0080.00016.77
8.0.180.0000.00716.80
8.0.170.0040.00416.84
8.0.160.0000.00816.79
8.0.150.0050.00316.64
8.0.140.0080.00016.64
8.0.130.0050.00213.25
8.0.120.0020.00516.81
8.0.110.0050.00316.83
8.0.100.0030.00516.76
8.0.90.0070.00016.65
8.0.80.0140.00716.88
8.0.70.0050.00216.69
8.0.60.0000.00716.94
8.0.50.0000.00716.68
8.0.30.0130.01016.96
8.0.20.0130.00717.40
8.0.10.0000.00716.77
8.0.00.0110.00516.63
7.4.330.0000.00515.03
7.4.320.0030.00316.44
7.4.300.0030.00316.53
7.4.290.0030.00316.48
7.4.280.0040.00416.41
7.4.270.0000.00816.45
7.4.260.0030.00316.36
7.4.250.0000.00716.31
7.4.240.0040.00416.45
7.4.230.0030.00316.52
7.4.220.0090.01216.39
7.4.210.0090.00616.52
7.4.200.0000.00716.35
7.4.160.0100.00516.37
7.4.150.0060.01217.40
7.4.140.0140.00417.86
7.4.130.0130.00716.46
7.4.120.0100.00716.35
7.4.110.0090.00916.38
7.4.100.0130.00316.23
7.4.90.0110.00516.53
7.4.80.0080.01519.39
7.4.70.0110.00916.52
7.4.60.0130.00316.34
7.4.50.0000.00516.39
7.4.40.0090.01416.16
7.4.30.0110.00816.41
7.4.00.0040.01114.51
7.3.330.0030.00313.02
7.3.320.0000.00512.91
7.3.310.0070.00016.18
7.3.300.0000.00715.88
7.3.290.0050.00916.17
7.3.280.0060.01116.14
7.3.270.0060.01217.40
7.3.260.0100.00716.12
7.3.250.0080.00916.27
7.3.240.0140.00416.10
7.3.230.0120.00616.39
7.3.210.0100.01016.30
7.3.200.0120.00419.39
7.3.190.0110.00616.28
7.3.180.0080.00816.24
7.3.170.0100.00716.27
7.3.160.0130.00316.14
7.3.10.0100.00316.10
7.3.00.0080.00416.34
7.2.330.0030.01316.34
7.2.320.0100.00716.62
7.2.310.0200.00416.53
7.2.300.0030.01416.43
7.2.290.0180.00416.30
7.2.130.0040.01116.52
7.2.120.0100.00716.56
7.2.110.0060.01316.46
7.2.100.0120.00616.63
7.2.90.0130.00316.69
7.2.80.0110.00516.51
7.2.70.0100.00316.57
7.2.60.0140.00516.85
7.2.50.0240.00716.59
7.2.40.0100.01316.17
7.2.30.0130.01316.77
7.2.20.0380.00816.62
7.2.10.0560.00416.52
7.2.00.0080.01017.80
7.1.250.0110.00515.45
7.1.200.0070.00715.65
7.1.100.0000.01218.16
7.1.70.0030.00617.10
7.1.60.0120.00919.46
7.1.50.0060.01217.02
7.1.00.0030.07722.33
7.0.200.0000.01016.74
7.0.140.0030.04022.09
7.0.60.0030.07019.98
7.0.50.0100.05317.88
7.0.40.0100.08020.02
7.0.30.0330.04720.09
7.0.20.0230.03320.09
7.0.10.0030.04720.02
7.0.00.0000.07720.19
5.6.210.0030.05020.72
5.6.200.0000.08718.21
5.6.190.0100.07720.56
5.6.180.0230.04720.43
5.6.170.0170.04320.48
5.6.160.0000.04320.70
5.6.150.0030.06018.09
5.6.140.0030.04018.27
5.6.130.0000.07318.11
5.6.120.0100.09021.10
5.6.110.0230.06721.00
5.6.100.0130.07721.04
5.6.90.0130.05721.10
5.6.80.0030.08020.51
5.5.350.4170.03720.44
5.5.340.0100.07717.96
5.5.330.0100.04720.40
5.5.320.0230.07020.31
5.5.310.0400.07020.27
5.5.300.0030.03717.92
5.5.290.0070.04717.98
5.5.280.0070.08320.84
5.5.270.0070.07720.76
5.5.260.0030.05320.84
5.5.250.0070.03720.61
5.5.240.0130.07020.15
5.4.450.0830.06019.52
5.4.440.0870.05719.57
5.4.430.0770.06019.66
5.4.420.0800.06019.36
5.4.410.0730.05719.42
5.4.400.0730.05318.83
5.4.390.0200.05318.49
5.4.380.0230.05318.65
5.4.370.0130.06318.67
5.4.360.0300.04318.46
5.4.350.0200.05318.46
5.4.340.0200.05018.50
5.4.320.0370.04318.73
5.4.310.0170.06018.56
5.4.300.0330.06318.68
5.4.290.0300.06318.71
5.4.280.0130.08018.67
5.4.270.0300.06718.77
5.4.260.0400.05318.68
5.4.250.0300.06718.68
5.4.240.0300.06318.75
5.4.230.0230.04718.49
5.4.220.0200.05718.55
5.4.210.0270.05018.49
5.4.200.0100.06016.48
5.4.190.0230.05018.49
5.4.180.0200.05718.76
5.4.170.0170.06018.61
5.4.160.0270.04018.53
5.4.150.0200.05318.61
5.4.140.0100.06016.34
5.4.130.0070.05716.22
5.4.120.0170.05016.19
5.4.110.0100.05716.06
5.4.100.0270.04316.16
5.4.90.0130.05716.22
5.4.80.0230.04716.13
5.4.70.0270.06316.14
5.4.60.0170.05316.10
5.4.50.0270.04016.17
5.4.40.0270.05016.23
5.4.30.0170.05016.21
5.4.20.0130.05716.19
5.4.10.0200.05016.12
5.4.00.0230.04715.71
5.3.290.0330.06714.71
5.3.280.0130.07714.68
5.3.270.0170.05314.70
5.3.260.0070.06014.57
5.3.250.0130.05314.58
5.3.240.0100.05714.51
5.3.230.0200.04714.56
5.3.220.0300.04314.47
5.3.210.0200.05314.56
5.3.200.0130.05314.55
5.3.190.0230.04714.64
5.3.180.0200.05714.54
5.3.170.0200.05014.48
5.3.160.0270.04314.49
5.3.150.0130.05714.54
5.3.140.0270.04014.53
5.3.130.0300.05314.54
5.3.120.0130.06714.48
5.3.110.0130.05714.44
5.3.100.0130.05713.93
5.3.90.0170.05314.01
5.3.80.0200.04714.11
5.3.70.0130.06714.01
5.3.60.0170.05714.09
5.3.50.0200.05014.03
5.3.40.0330.05713.86
5.3.30.0170.07013.89
5.3.20.0270.05713.79
5.3.10.0230.05313.63
5.3.00.0200.04713.66
5.2.170.0070.05011.11
5.2.160.0170.03711.09
5.2.150.0130.04011.10
5.2.140.0200.03711.19
5.2.130.0130.04011.01
5.2.120.0130.04311.07
5.2.110.0200.04011.03
5.2.100.0130.03711.15
5.2.90.0100.04311.09
5.2.80.0200.03711.13
5.2.70.0100.05011.05
5.2.60.0100.04311.02
5.2.50.0130.04311.05
5.2.40.0100.04010.97
5.2.30.0130.04710.93
5.2.20.0130.03711.02
5.2.10.0170.03710.86
5.2.00.0130.03710.72
5.1.60.0130.03310.06
5.1.50.0070.04010.09
5.1.40.0130.04010.00
5.1.30.0130.03710.34
5.1.20.0170.03310.41
5.1.10.0100.04010.10
5.1.00.0230.02710.18
5.0.50.0070.0308.56
5.0.40.0030.0338.51
5.0.30.0070.0438.22
5.0.20.0070.0308.17
5.0.10.0070.0308.37
5.0.00.0100.0508.27
4.4.90.0070.0235.89
4.4.80.0000.0335.90
4.4.70.0070.0305.90
4.4.60.0030.0275.88
4.4.50.0100.0305.82
4.4.40.0170.0405.81
4.4.30.0070.0305.90
4.4.20.0070.0235.91
4.4.10.0070.0205.96
4.4.00.0130.0305.90
4.3.110.0070.0235.75
4.3.100.0030.0235.82
4.3.90.0030.0275.79
4.3.80.0030.0375.79
4.3.70.0000.0275.79
4.3.60.0070.0205.86
4.3.50.0030.0275.80
4.3.40.0070.0335.86
4.3.30.0030.0234.56
4.3.20.0030.0234.56
4.3.10.0030.0234.60
4.3.00.0170.0206.83

preferences:
43.13 ms | 400 KiB | 5 Q