3v4l.org

run code in 300+ PHP versions simultaneously
<?php $line = "9938275IBUPROFENIX 400 mg comp.x 10 00000594NNPhoenix 00000062220110810001001803827517791848330116001010NNN00"; $str = trim(trim(substr($line, 7, 44)) . ' ' . trim(substr($line, 51, 24))); $changes = array( 'E1' => 'B', 'A7' => 'º', 'A5' => 'Ñ', 'A4' => 'ñ', 'A3' => 'ú', 'A2' => 'ó', 'A1' => 'í', '82' => 'é', 'A0' => 'á', '9A' => 'U', ); foreach ($changes as $key => $value){ $str = $this->doFix($str, $key, $value); } $str = str_replace(',', ', ', $str); $str = str_replace('+', ' + ', $str); $str = str_replace('¥', 'Ñ', $str); $str = str_replace('š', 'U', $str); $str = ucfirst(trim($str)); $str = preg_replace('/\s+/', ' ', $str); $brand = trim(substr($line, 7, 44)); echo $str . '----'; echo $brand . '----';

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.0150.00618.53
8.3.60.0150.00018.43
8.3.50.0120.00721.12
8.3.40.0060.01218.97
8.3.30.0070.00718.85
8.3.20.0050.00320.34
8.3.10.0050.00321.89
8.3.00.0070.00318.04
8.2.190.0160.00316.58
8.2.180.0150.00616.75
8.2.170.0070.00722.96
8.2.160.0100.00320.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0030.00617.75
8.2.110.0060.00321.18
8.2.100.0110.00017.68
8.2.90.0050.00319.08
8.2.80.0000.00817.97
8.2.70.0030.00517.75
8.2.60.0190.00017.80
8.2.50.0000.00818.07
8.2.40.0000.00919.25
8.2.30.0000.00920.57
8.2.20.0000.00717.82
8.2.10.0000.00718.20
8.2.00.0040.00418.12
8.1.280.0070.01025.92
8.1.270.0060.00323.75
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00022.06
8.1.230.0120.00019.13
8.1.220.0000.00817.78
8.1.210.0050.00318.77
8.1.200.0030.00617.23
8.1.190.0040.00417.36
8.1.180.0040.00418.10
8.1.170.0000.00718.65
8.1.160.0050.00321.95
8.1.150.0030.00618.88
8.1.140.0030.00617.46
8.1.130.0030.00317.82
8.1.120.0040.00417.48
8.1.110.0070.00017.50
8.1.100.0040.00417.53
8.1.90.0000.00717.45
8.1.80.0090.00017.46
8.1.70.0050.00317.45
8.1.60.0040.00417.51
8.1.50.0040.00417.50
8.1.40.0030.00517.60
8.1.30.0040.00417.54
8.1.20.0000.00817.59
8.1.10.0000.00717.48
8.1.00.0000.00817.52
8.0.300.0070.00018.77
8.0.290.0000.00716.61
8.0.280.0030.00318.39
8.0.270.0030.00317.18
8.0.260.0000.00717.14
8.0.250.0000.00917.05
8.0.240.0050.00216.94
8.0.230.0000.00717.07
8.0.220.0000.00716.95
8.0.210.0040.00417.00
8.0.200.0040.00417.04
8.0.190.0040.00416.93
8.0.180.0040.00316.88
8.0.170.0000.00717.05
8.0.160.0070.00016.91
8.0.150.0030.00316.81
8.0.140.0000.00716.81
8.0.130.0050.00013.35
8.0.120.0040.00416.77
8.0.110.0040.00416.93
8.0.100.0030.00617.08
8.0.90.0000.00716.83
8.0.80.0030.01216.97
8.0.70.0040.00416.86
8.0.60.0030.00616.99
8.0.50.0030.00516.88
8.0.30.0100.00617.03
8.0.20.0130.00517.40
8.0.10.0040.00417.20
8.0.00.0090.00816.82
7.4.330.0020.00215.08
7.4.320.0000.00716.66
7.4.300.0060.00016.60
7.4.290.0020.00516.52
7.4.280.0000.00816.60
7.4.270.0000.00716.41
7.4.260.0030.00316.40
7.4.250.0030.00516.56
7.4.240.0060.00116.47
7.4.230.0000.00716.72
7.4.220.0090.00916.61
7.4.210.0100.01016.55
7.4.200.0020.00516.51
7.4.160.0080.00816.50
7.4.150.0070.01017.40
7.4.140.0110.00617.86
7.4.130.0050.01216.58
7.4.120.0110.00616.56
7.4.110.0070.01416.43
7.4.100.0100.01316.60
7.4.90.0120.00616.34
7.4.80.0100.01019.39
7.4.70.0060.01016.61
7.4.60.0100.01316.61
7.4.50.0030.00516.77
7.4.40.0080.00816.23
7.4.30.0030.01416.58
7.4.00.0060.00614.96
7.3.330.0050.00013.18
7.3.320.0030.00313.33
7.3.310.0000.00716.15
7.3.300.0050.00216.38
7.3.290.0060.00816.36
7.3.280.0060.00916.32
7.3.270.0140.00317.40
7.3.260.0050.01416.48
7.3.250.0100.01116.47
7.3.240.0060.01216.52
7.3.230.0060.01016.45
7.3.210.0120.00616.42
7.3.200.0060.01116.49
7.3.190.0090.00616.61
7.3.180.0100.00616.50
7.3.170.0060.01516.52
7.3.160.0000.01516.50
7.2.330.0150.00616.66
7.2.320.0120.00616.69
7.2.310.0150.00616.70
7.2.300.0100.00716.76
7.2.290.0090.00916.63
7.2.60.0150.00516.18
7.2.00.0030.01019.52
7.1.200.0000.00715.87
7.1.100.0090.00618.08
7.1.70.0030.00717.16
7.1.60.0090.00619.29
7.1.50.0310.00334.78
7.1.00.0030.07722.52
7.0.200.0000.00816.89
7.0.60.0170.03020.05
7.0.50.0030.04717.93
7.0.40.0130.06720.12
7.0.30.0230.03720.17
7.0.20.0330.07720.16
7.0.10.0170.08320.09
7.0.00.0070.04020.14
5.6.280.0000.03721.13
5.6.210.0000.08320.57
5.6.200.0170.04318.11
5.6.190.0030.05720.35
5.6.180.0230.07720.64
5.6.170.0130.04720.61
5.6.160.0100.06020.71
5.6.150.0030.08718.18
5.6.140.0000.05018.16
5.6.130.0070.04018.18
5.6.120.0070.08321.00
5.6.110.0270.05021.02
5.6.100.0070.08720.98
5.6.90.0070.08321.11
5.6.80.0170.07720.49
5.5.350.0100.07720.43
5.5.340.0030.03717.98
5.5.330.0100.03720.25
5.5.320.0200.04720.13
5.5.310.0530.06320.20
5.5.300.0030.03717.92
5.5.290.0030.04317.98
5.5.280.0030.04320.85
5.5.270.0070.09020.88
5.5.260.0070.08320.88
5.5.250.0100.08320.69
5.5.240.0000.08320.20
5.4.450.0830.05019.59
5.4.440.0730.06319.51
5.4.430.0900.06719.51
5.4.420.0770.06019.40
5.4.410.0830.07019.47
5.4.400.0870.05319.30
5.4.390.0770.05319.19
5.4.380.0700.06019.27
5.4.370.0800.07719.28
5.4.360.0870.08019.26
5.4.350.0870.04018.78
5.4.340.0830.04318.91
5.4.320.0900.05718.82
5.4.310.0900.05019.30
5.4.300.0730.06719.22
5.4.290.0800.05019.11
5.4.280.0730.05319.19
5.4.270.0770.05318.82
5.4.260.0700.05318.99
5.4.250.0930.06718.80
5.4.240.0730.05019.29
5.4.230.0600.06718.99
5.4.220.0670.06018.80
5.4.210.0630.06019.29
5.4.200.0830.07719.07
5.4.190.0670.05719.27
5.4.180.0730.04719.31
5.4.170.0700.06019.17
5.4.160.0930.06319.13
5.4.150.0770.06019.09
5.4.140.0770.04316.20
5.4.130.0930.06016.24
5.4.120.0800.06716.29
5.4.110.1000.05316.55
5.4.100.0830.07016.46
5.4.90.0830.06716.29
5.4.80.0700.05016.52
5.4.70.0030.03716.21
5.4.60.0270.03716.38
5.4.50.0270.06016.04
5.4.40.0230.05716.28
5.4.30.0030.03716.45
5.4.20.0130.03716.36
5.4.10.0270.05316.20

preferences:
61.56 ms | 401 KiB | 5 Q