3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "txn_status=0|txn_msg=success|txn_err_msg=NA|clnt_txn_ref=969239|tpsl_bank_cd=470|tpsl_txn_id=192630337|txn_amt=1.00|clnt_rqst_meta={itc:NIC~TXN0001~122333~rt14154~8 mar 2014~Payment~forpayment}{custname:test}|tpsl_txn_time=26-12-2015 15:56:20|tpsl_rfnd_id=NA|bal_amt=NA|rqst_token=hdfs-df-jkfhskjfhsjkd|hash=jhdsfs54367jhf"; $arr = explode("|", $string); foreach ($arr as $key => $value) { $newArr = explode("=", $value); $myRequiredArr[$newArr[0]] = $newArr[1]; } echo "<pre>"; print_r($myRequiredArr);$string = "txn_status=0|txn_msg=success|txn_err_msg=NA|clnt_txn_ref=969239|tpsl_bank_cd=470|tpsl_txn_id=192630337|txn_amt=1.00|clnt_rqst_meta={itc:NIC~TXN0001~122333~rt14154~8 mar 2014~Payment~forpayment}{custname:test}|tpsl_txn_time=26-12-2015 15:56:20|tpsl_rfnd_id=NA|bal_amt=NA|rqst_token=hdfs-df-jkfhskjfhsjkd|hash=jhdsfs54367jhf"; $arr = call_user_func_array('array_merge',array_map(function($v){ $a = explode("=",$v); return array($a[0] => $a[1]);},explode('|',$string))); print_r($arr);

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.0140.00716.75
8.3.50.0090.00616.47
8.3.40.0070.00718.84
8.3.30.0140.00018.97
8.3.20.0050.00320.21
8.3.10.0060.00323.48
8.3.00.0040.00423.54
8.2.180.0100.01016.50
8.2.170.0110.00422.96
8.2.160.0100.00620.35
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00021.12
8.2.110.0090.00921.12
8.2.100.0060.00617.68
8.2.90.0080.00019.34
8.2.80.0050.00317.97
8.2.70.0060.00317.50
8.2.60.0040.00418.03
8.2.50.0050.00518.07
8.2.40.0090.00018.35
8.2.30.0000.00818.10
8.2.20.0050.00217.77
8.2.10.0030.00518.21
8.2.00.0050.00218.21
8.1.280.0120.00325.92
8.1.270.0000.00823.70
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0090.00022.56
8.1.230.0060.00617.64
8.1.220.0030.00617.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0060.00617.11
8.1.180.0030.00618.10
8.1.170.0030.00718.63
8.1.160.0000.00818.92
8.1.150.0040.00418.92
8.1.140.0030.00619.55
8.1.130.0000.00717.73
8.1.120.0040.00417.39
8.1.110.0000.00717.47
8.1.100.0040.00417.55
8.1.90.0070.00017.42
8.1.80.0040.00417.48
8.1.70.0000.00817.51
8.1.60.0000.00817.66
8.1.50.0110.00017.52
8.1.40.0040.00417.43
8.1.30.0050.00317.73
8.1.20.0050.00317.58
8.1.10.0040.00417.68
8.1.00.0040.00417.61
8.0.300.0070.00018.77
8.0.290.0030.00516.75
8.0.280.0000.00718.57
8.0.270.0040.00417.34
8.0.260.0030.00317.16
8.0.250.0040.00417.04
8.0.240.0030.00316.88
8.0.230.0040.00417.02
8.0.220.0000.00716.89
8.0.210.0000.00816.93
8.0.200.0030.00317.02
8.0.190.0050.00316.93
8.0.180.0110.00016.85
8.0.170.0040.00416.83
8.0.160.0000.00716.82
8.0.150.0050.00316.72
8.0.140.0050.00316.87
8.0.130.0050.00013.29
8.0.120.0080.00016.89
8.0.110.0030.00616.77
8.0.100.0040.00417.01
8.0.90.0000.00717.05
8.0.80.0120.00316.88
8.0.70.0070.00016.91
8.0.60.0040.00416.74
8.0.50.0040.00416.95
8.0.30.0130.00617.18
8.0.20.0110.00717.40
8.0.10.0040.00416.92
8.0.00.0090.01217.00
7.4.330.0000.00616.73
7.4.320.0000.00616.63
7.4.300.0030.00316.64
7.4.290.0030.00316.45
7.4.280.0090.00016.67
7.4.270.0070.00016.69
7.4.260.0070.00016.42
7.4.250.0000.00916.57
7.4.240.0040.00316.59
7.4.230.0070.00016.64
7.4.220.0100.01016.41
7.4.210.0060.00916.67
7.4.200.0030.00316.43
7.4.160.0050.01116.74
7.4.150.0110.01117.40
7.4.140.0130.00817.86
7.4.130.0130.00616.60
7.4.120.0130.00516.58
7.4.110.0170.00016.52
7.4.100.0060.01116.46
7.4.90.0140.00616.43
7.4.80.0000.01819.39
7.4.70.0130.00416.54
7.4.60.0070.01016.54
7.4.50.0060.00916.37
7.4.40.0070.01016.46
7.4.30.0140.00716.68
7.4.00.0070.00715.13
7.3.330.0000.00513.40
7.3.320.0000.00613.27
7.3.310.0070.00016.30
7.3.300.0000.00616.30
7.3.290.0080.00816.36
7.3.280.0110.00516.39
7.3.270.0140.00417.40
7.3.260.0070.01016.43
7.3.250.0110.00716.49
7.3.240.0100.00716.33
7.3.230.0080.00816.39
7.3.210.0090.01216.29
7.3.200.0030.01419.39
7.3.190.0140.00316.56
7.3.180.0140.00316.55
7.3.170.0150.00716.32
7.3.160.0130.00316.51
7.3.00.0060.00616.80
7.2.330.0090.00916.38
7.2.320.0140.00716.85
7.2.310.0060.01116.58
7.2.300.0060.01116.44
7.2.290.0030.01316.56
7.2.130.0090.00316.83
7.2.120.0000.00817.11
7.2.110.0030.01316.83
7.2.100.0070.00716.91
7.2.90.0080.00517.08
7.2.80.0080.00816.98
7.2.70.0030.00716.73
7.2.60.0050.00716.90
7.2.50.0070.00716.90
7.2.40.0030.00717.03
7.2.30.0060.00617.15
7.2.20.0030.01016.90
7.2.10.0040.00817.09
7.2.00.0030.01417.09
7.1.250.0070.00415.93
7.1.240.0060.00315.61
7.1.230.0100.00315.95
7.1.220.0070.00715.66
7.1.210.0080.00415.86
7.1.200.0070.00715.57
7.1.190.0030.01215.86
7.1.180.0000.01515.52
7.1.170.0090.00015.65
7.1.160.0030.01015.52
7.1.150.0040.01115.77
7.1.140.0130.00315.78
7.1.130.0060.00315.79
7.1.120.0090.00315.82
7.1.110.0030.01315.89
7.1.100.0030.00717.01
7.1.90.0030.00715.80
7.1.80.0000.01115.61
7.1.70.0050.00516.55
7.1.60.0050.01217.63
7.1.50.0090.01016.27
7.1.40.0030.00715.68
7.1.30.0080.00015.91
7.1.20.0080.00315.64
7.1.10.0000.01416.02
7.1.00.0080.03819.03
7.0.330.0030.00715.41
7.0.320.0030.00615.51
7.0.310.0060.01015.20
7.0.300.0130.00315.43
7.0.290.0030.01015.50
7.0.280.0030.01215.16
7.0.270.0030.00915.40
7.0.260.0070.00715.44
7.0.250.0060.00615.48
7.0.240.0060.00615.63
7.0.230.0060.01015.43
7.0.220.0030.01315.43
7.0.210.0070.01015.33
7.0.200.0050.00816.23
7.0.190.0000.01115.37
7.0.180.0030.00915.34
7.0.170.0040.00815.22
7.0.160.0100.00315.22
7.0.150.0030.00715.47
7.0.140.0100.00315.51
7.0.130.0070.00715.66
7.0.120.0000.00715.50
7.0.110.0000.00815.39
7.0.100.0090.00615.57
7.0.90.0100.00315.20
7.0.80.0060.00615.72
7.0.70.0050.00315.16
7.0.60.0170.04118.70
7.0.50.0080.04416.77
7.0.40.0080.02816.86
7.0.30.0100.02916.78
7.0.20.0200.03516.76
7.0.10.0070.04016.90
7.0.00.0070.04316.92
5.6.380.0100.00014.30
5.6.370.0030.01014.71
5.6.360.0090.00614.51
5.6.350.0080.00414.78
5.6.340.0060.00914.74
5.6.330.0040.01114.57
5.6.320.0070.01013.97
5.6.310.0110.00014.39
5.6.300.0060.00614.37
5.6.290.0060.00614.58
5.6.280.0040.03917.60
5.6.270.0060.00614.70
5.6.260.0060.00614.60
5.6.250.0110.00014.53
5.6.240.0030.00714.55
5.6.230.0030.01314.50
5.6.220.0040.01114.50
5.6.210.0060.03917.48
5.6.200.0040.02716.34
5.6.190.0020.03017.60
5.6.180.0190.02917.39
5.6.170.0160.03517.46
5.6.160.0120.03017.41
5.6.150.0060.02516.39
5.6.140.0020.04416.42
5.6.130.0080.03716.29
5.6.120.0030.04517.70
5.6.110.0030.04517.77
5.6.100.0070.04017.84
5.6.90.0080.02517.64
5.6.80.0120.03817.29
5.6.70.0040.01114.47
5.6.60.0000.01414.07
5.6.50.0000.01014.48
5.6.40.0000.01214.27
5.6.30.0100.00014.22
5.6.20.0040.01114.42
5.6.10.0030.01014.30
5.6.00.0060.00913.97
5.5.380.0000.00811.14
5.5.370.0030.00511.21
5.5.360.0030.01011.33
5.5.350.0050.02215.81
5.5.340.0100.02514.64
5.5.330.0050.03415.85
5.5.320.0130.03015.65
5.5.310.0100.02215.68
5.5.300.0030.02514.56
5.5.290.0100.03914.57
5.5.280.0080.04116.08
5.5.270.0050.02816.03
5.5.260.0060.02515.97
5.5.250.0060.04015.85
5.5.240.0130.03415.52
5.5.230.0080.00011.23
5.5.220.0030.00311.29
5.5.210.0030.00711.20
5.5.200.0030.00311.16
5.5.190.0040.00811.04
5.5.180.0060.00311.27
5.5.170.0060.00310.91
5.5.160.0000.01011.10
5.5.150.0000.00611.19
5.5.140.0030.00911.03
5.5.130.0040.00411.18
5.5.120.0040.00811.09
5.5.110.0030.00311.03
5.5.100.0040.00410.99
5.5.90.0040.00411.18
5.5.80.0030.00911.04
5.5.70.0030.00611.23
5.5.60.0030.00610.95
5.5.50.0060.00011.09
5.5.40.0080.00011.08
5.5.30.0000.00811.27
5.5.20.0000.00811.05
5.5.10.0000.00910.79
5.5.00.0000.00811.24

preferences:
54.13 ms | 404 KiB | 6 Q