3v4l.org

run code in 300+ PHP versions simultaneously
<?php $jsonString = '[{"salesid":130201411173700750}]'; // PHP code $payments = json_decode(stripslashes(html_entity_decode(rtrim($jsonString, '\0'))), true); $values = ''; foreach ($payments as $key => $value) { $value = (object)$value; if ($values != '') { $values .= ','; } printResponse(false, "sales id: $value->salesid"); exit; //more code omitted... } function printResponse($success, $data, $totalCount = 0) { header('Content-Type: application/json;charset=UTF-8'); print json_encode((object)[ 'success' => $success, 'data' => $data, 'totalCount' => $totalCount ]); exit; }

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.4.120.0090.01024.34
8.4.110.0100.00920.69
8.4.100.0050.00419.04
8.4.90.0110.00920.24
8.4.80.0130.00720.49
8.4.70.0120.00818.20
8.4.60.0120.00918.89
8.4.50.0110.00918.73
8.4.40.0170.00317.68
8.4.30.0100.01017.63
8.4.20.0060.00920.34
8.4.10.0060.00319.55
8.3.250.0150.00417.23
8.3.240.0120.00717.32
8.3.230.0120.00716.80
8.3.220.0040.00318.86
8.3.210.0120.00416.85
8.3.200.0060.00516.79
8.3.190.0110.00719.06
8.3.180.0120.00617.19
8.3.170.0120.00320.64
8.3.160.0160.00316.63
8.3.150.0150.00317.07
8.3.140.0110.00416.73
8.3.130.0030.00618.30
8.3.120.0150.00418.89
8.3.110.0060.00320.94
8.3.100.0050.00524.06
8.3.90.0080.00026.77
8.3.80.0060.00317.97
8.3.70.0160.00318.39
8.3.60.0120.00418.55
8.3.50.0070.00718.19
8.3.40.0090.00618.92
8.3.30.0090.00618.79
8.3.20.0040.00419.22
8.3.10.0000.00821.96
8.3.00.0000.00823.65
8.2.290.0040.00420.64
8.2.280.0130.00718.47
8.2.270.0030.01417.25
8.2.260.0030.00516.60
8.2.250.0040.00416.80
8.2.240.0040.00419.21
8.2.230.0050.00522.58
8.2.220.0080.00037.54
8.2.210.0040.00426.77
8.2.200.0040.00716.88
8.2.190.0120.00316.63
8.2.180.0120.00916.75
8.2.170.0040.01122.96
8.2.160.0070.01020.48
8.2.150.0040.00424.18
8.2.140.0000.00724.66
8.2.130.0030.00522.13
8.2.120.0050.00226.35
8.2.110.0030.00622.24
8.2.100.0120.00019.64
8.2.90.0000.00817.75
8.2.80.0040.00417.97
8.2.70.0080.00017.93
8.2.60.0080.00017.93
8.2.50.0050.00318.10
8.2.40.0050.00219.52
8.2.30.0000.00720.60
8.2.20.0000.00718.13
8.2.10.0030.00518.14
8.2.00.0040.00419.55
8.1.330.0090.00921.91
8.1.320.0100.00616.05
8.1.310.0070.01115.90
8.1.300.0130.00316.39
8.1.290.0050.00530.84
8.1.280.0110.00425.92
8.1.270.0040.00423.77
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0050.00523.90
8.1.230.0030.00719.14
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0070.00317.35
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0000.00818.79
8.1.160.0070.00018.93
8.1.150.0050.00218.89
8.1.140.0000.00919.02
8.1.130.0030.00619.02
8.1.120.0000.00717.43
8.1.110.0040.00417.31
8.1.100.0000.00717.50
8.1.90.0000.00717.48
8.1.80.0100.00017.45
8.1.70.0000.00717.35
8.1.60.0030.00617.58
8.1.50.0050.00317.55
8.1.40.0030.00617.47
8.1.30.0060.00617.65
8.1.20.0020.00517.53
8.1.10.0000.01117.63
8.1.00.0000.00817.46
8.0.300.0080.00018.77
8.0.290.0040.00416.63
8.0.280.0050.00318.36
8.0.270.0030.00317.27
8.0.260.0030.00317.32
8.0.250.0000.00617.01
8.0.240.0000.00716.94
8.0.230.0070.00016.90
8.0.220.0000.00716.84
8.0.210.0050.00316.95
8.0.200.0000.00617.01
8.0.190.0070.00017.00
8.0.180.0030.00616.94
8.0.170.0000.00816.87
8.0.160.0040.00416.92
8.0.150.0030.00716.98
8.0.140.0000.00816.92
8.0.130.0000.00513.39
8.0.120.0030.00316.93
8.0.110.0080.00016.96
8.0.100.0070.00016.86
8.0.90.0040.00417.00
8.0.80.0090.00616.94
8.0.70.0070.00016.83
8.0.60.0030.00516.98
8.0.50.0040.00417.02
8.0.30.0100.00717.17
8.0.20.0120.00817.40
8.0.10.0040.00416.97
8.0.00.0170.00516.75
7.4.330.0050.00015.55
7.4.320.0000.00616.54
7.4.300.0030.00316.64
7.4.290.0030.00316.48
7.4.280.0040.00416.64
7.4.270.0000.00716.52
7.4.260.0050.00316.57
7.4.250.0000.00716.57
7.4.240.0030.00516.45
7.4.230.0070.00016.63
7.4.220.0080.00016.34
7.4.210.0060.01116.56
7.4.200.0000.00716.70
7.4.160.0070.01116.51
7.4.140.0110.00917.86
7.4.130.0110.00716.68
7.4.120.0140.00616.54
7.4.110.0100.01016.59
7.4.100.0120.00616.43
7.4.90.0000.01616.53
7.4.80.0120.00819.39
7.4.70.0150.00316.53
7.4.60.0120.00916.52
7.4.50.0000.01616.48
7.4.40.0090.00916.48
7.4.00.0040.01415.21
7.3.330.0020.00213.48
7.3.320.0050.00013.25
7.3.310.0000.00716.47
7.3.300.0030.00316.44
7.3.290.0000.00716.39
7.3.280.0070.01116.42
7.3.260.0070.01016.53
7.3.240.0080.00916.49
7.3.230.0120.00816.54
7.3.210.0120.00916.41
7.3.200.0110.00516.71
7.3.190.0070.01016.45
7.3.180.0100.00616.49
7.3.170.0110.00616.70
7.3.160.0090.00816.55
7.2.330.0100.01416.79
7.2.320.0070.01016.86
7.2.310.0030.01716.79
7.2.300.0100.00716.63
7.2.290.0060.00916.76
7.2.80.0240.00314.61
7.2.70.0720.00714.63
7.2.60.0190.01014.97
7.2.50.0220.00914.71
7.2.40.0300.00714.94
7.2.30.0260.00714.86
7.2.20.0220.00914.91
7.2.10.0250.00714.76
7.2.00.0210.00715.00
7.1.200.0030.00315.88
7.1.190.0250.00913.71
7.1.180.0210.00713.48
7.1.170.0290.00313.57
7.1.160.0290.00613.67
7.1.150.0270.00313.96
7.1.140.0380.00313.89
7.1.130.0270.00713.70
7.1.120.0190.00613.84
7.1.110.0230.00313.70
7.1.100.0280.00313.76
7.1.90.0220.00613.55
7.1.80.0190.00913.96
7.1.70.0210.00713.92
7.1.60.0380.00731.57
7.1.50.0390.00631.93
7.1.40.0350.01031.71
7.1.30.0360.01031.75
7.1.20.0420.00431.45
7.1.10.0250.00613.82
7.1.00.0160.01313.80

preferences:
60.83 ms | 403 KiB | 5 Q