3v4l.org

run code in 300+ PHP versions simultaneously
<?php function parseErrorMessage($string) { foreach(explode(PHP_EOL, $string) as $line){ // split on end of lines list($label,$message)=explode(' - ',$line,2); // limit the explosion to 2 elements $result[$label]=$message; // append to result array using first half and second half of line } return $result; } $string ="Error Type - Database Error Message - Error Executing Database Something is wrong. Error Detail - [Macromedia][SQLServer JDBC Driver][SQLServer]Incorrect syntax ne-ar '1'."; print_r(parseErrorMessage($string));

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.0060.00916.63
8.3.50.0100.00716.47
8.3.40.0070.00718.71
8.3.30.0100.01018.57
8.3.20.0040.00420.31
8.3.10.0050.00323.48
8.3.00.0030.00623.69
8.2.180.0070.00725.92
8.2.170.0070.00722.96
8.2.160.0100.01020.57
8.2.150.0040.00724.18
8.2.140.0080.00024.66
8.2.130.0030.00526.16
8.2.120.0080.00026.16
8.2.110.0090.00021.07
8.2.100.0040.00717.84
8.2.90.0040.00419.21
8.2.80.0030.00517.97
8.2.70.0000.00817.63
8.2.60.0000.00817.93
8.2.50.0080.00020.01
8.2.40.0000.00720.42
8.2.30.0080.00021.02
8.2.20.0000.00718.24
8.2.10.0040.00418.18
8.2.00.0040.00417.99
8.1.280.0070.01025.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0030.00622.05
8.1.230.0040.00717.89
8.1.220.0000.00817.79
8.1.210.0040.00418.77
8.1.200.0060.00317.38
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0030.00518.57
8.1.160.0070.00018.88
8.1.150.0050.00218.99
8.1.140.0000.00717.74
8.1.130.0000.00718.90
8.1.120.0030.00317.39
8.1.110.0000.00817.51
8.1.100.0040.00417.42
8.1.90.0030.00317.50
8.1.80.0040.00417.36
8.1.70.0000.00717.46
8.1.60.0030.00517.61
8.1.50.0050.00317.53
8.1.40.0080.00017.59
8.1.30.0000.00717.55
8.1.20.0000.00817.65
8.1.10.0050.00217.51
8.1.00.0000.00817.36
8.0.300.0040.00418.77
8.0.290.0030.00616.75
8.0.280.0000.00818.49
8.0.270.0040.00417.16
8.0.260.0030.00516.82
8.0.250.0040.00416.86
8.0.240.0080.00016.83
8.0.230.0030.00316.93
8.0.220.0040.00416.90
8.0.210.0030.00316.89
8.0.200.0090.00016.85
8.0.190.0000.00816.97
8.0.180.0030.00716.95
8.0.170.0000.00716.95
8.0.160.0000.00716.81
8.0.150.0030.00816.94
8.0.140.0030.00316.81
8.0.130.0050.00013.36
8.0.120.0060.00316.88
8.0.110.0080.00016.88
8.0.100.0030.00516.89
8.0.90.0040.00416.93
8.0.80.0090.00916.94
8.0.70.0000.00817.01
8.0.60.0040.00416.67
8.0.50.0040.00416.88
8.0.30.0120.00517.10
8.0.20.0100.01117.42
8.0.10.0050.00317.04
8.0.00.0090.01516.99
7.4.330.0000.00516.74
7.4.320.0060.00016.61
7.4.300.0070.00016.61
7.4.290.0000.00716.64
7.4.280.0040.00416.63
7.4.270.0040.00416.52
7.4.260.0040.00416.58
7.4.250.0000.00716.50
7.4.240.0000.00716.61
7.4.230.0070.00016.63
7.4.220.0060.01316.60
7.4.210.0100.00716.64
7.4.200.0000.00816.71
7.4.160.0080.00716.54
7.4.150.0110.00717.40
7.4.140.0130.00817.86
7.4.130.0100.01316.45
7.4.120.0090.00916.58
7.4.110.0160.00716.71
7.4.100.0090.00916.65
7.4.90.0080.01016.56
7.4.80.0070.01419.39
7.4.70.0070.01116.58
7.4.60.0040.01116.36
7.4.50.0090.00616.53
7.4.40.0100.00616.56
7.4.30.0080.01116.67
7.4.00.0070.00914.75
7.3.330.0050.00013.35
7.3.320.0070.00013.39
7.3.310.0070.00016.20
7.3.300.0000.00716.41
7.3.290.0060.00916.40
7.3.280.0060.01016.35
7.3.270.0100.00717.40
7.3.260.0120.00616.38
7.3.250.0090.01016.56
7.3.240.0080.01116.43
7.3.230.0130.00316.68
7.3.210.0060.01216.57
7.3.200.0070.01116.37
7.3.190.0090.01416.57
7.3.180.0060.01616.37
7.3.170.0100.00616.52
7.3.160.0060.00916.57
7.3.120.0100.00714.99
7.3.110.0060.01114.63
7.3.100.0040.01114.65
7.3.90.0070.00714.82
7.3.80.0090.00614.79
7.3.70.0040.01414.76
7.3.60.0090.00614.68
7.3.50.0040.00814.67
7.3.40.0020.01014.55
7.3.30.0030.00914.83
7.3.20.0040.00816.88
7.3.10.0060.00316.71
7.3.00.0040.01116.82
7.2.330.0150.00316.73
7.2.320.0080.00816.41
7.2.310.0130.00316.47
7.2.300.0080.00816.71
7.2.290.0170.00716.71
7.2.250.0070.00915.09
7.2.240.0060.00915.23
7.2.230.0030.01014.96
7.2.220.0030.01315.07
7.2.210.0060.00915.18
7.2.200.0100.00615.03
7.2.190.0090.00314.89
7.2.180.0000.01315.04
7.2.170.0040.00915.11
7.2.80.0000.00916.47
7.2.60.0100.00316.83
7.1.330.0070.01015.68
7.1.320.0070.01015.74
7.1.310.0100.00315.85
7.1.300.0060.00615.66
7.1.290.0100.01015.80
7.1.280.0080.00315.77
7.1.270.0050.00315.55
7.1.260.0060.00315.82
7.1.200.0030.01215.95
7.1.110.0370.01316.17
7.1.100.0430.00916.22
7.1.90.0000.01717.80
7.1.80.0190.00418.20
7.1.70.0060.01617.13
7.1.60.0350.00734.89
7.1.50.0230.01334.70
7.1.40.0280.01334.40
7.1.30.0150.01934.55
7.1.20.0250.01234.40
7.1.10.0110.00916.64
7.1.00.0100.01116.56
7.0.250.0240.01215.68
7.0.240.0370.01615.93
7.0.230.0090.00817.76
7.0.220.0080.01317.76
7.0.210.0110.01216.77
7.0.200.0120.00916.77
7.0.190.0070.01316.67
7.0.180.0110.00816.12
7.0.170.0030.01616.45
7.0.160.0130.00616.14
7.0.150.0050.01216.28
7.0.140.0080.00916.22
7.0.130.0090.00616.38
7.0.120.0080.00916.36
7.0.110.0060.01216.16
7.0.100.0070.01016.40
7.0.90.0050.01416.23
7.0.80.0060.01416.09
7.0.70.0080.01116.18
7.0.60.0030.01416.10
7.0.50.0100.00916.57
7.0.40.0040.01116.40
7.0.30.0000.01416.46
7.0.20.0080.01116.45
7.0.10.0070.01216.31
7.0.00.0030.02416.36

preferences:
58.27 ms | 400 KiB | 5 Q