3v4l.org

run code in 300+ PHP versions simultaneously
<?php $jsonStr = '{"return_data": { "friend_info": [ { "desc": "name", "value": "Ken" }, { "desc": "profile_pic", "value": "http://aaa.caa/1234569/picture?type=large" } ] }}'; $json = json_decode($jsonStr, true); $obj = new stdClass; foreach ($json["return_data"]["friend_info"] as $item) $obj->{$item["desc"]} = $item["value"]; $json["return_data"]["friend_info"] = $obj; $jsonStr = json_encode($json); echo $jsonStr;

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.130.0040.00418.35
8.3.120.0050.00318.84
8.3.110.0060.00320.94
8.3.100.0030.00624.06
8.3.90.0090.00326.77
8.3.80.0090.00017.97
8.3.70.0040.01216.79
8.3.60.0150.00618.55
8.3.50.0110.00518.15
8.3.40.0120.00318.83
8.3.30.0150.00018.63
8.3.20.0000.00818.63
8.3.10.0030.00522.08
8.3.00.0050.00321.90
8.2.250.0080.00016.80
8.2.240.0130.00619.00
8.2.230.0060.00322.58
8.2.220.0030.01437.54
8.2.210.0060.00326.77
8.2.200.0100.00316.63
8.2.190.0040.01116.73
8.2.180.0110.00416.38
8.2.170.0070.00722.96
8.2.160.0060.00919.04
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0040.00419.77
8.2.110.0030.00620.99
8.2.100.0070.00417.90
8.2.90.0040.00417.97
8.2.80.0030.00618.02
8.2.70.0040.00418.05
8.2.60.0030.00618.16
8.2.50.0040.00418.10
8.2.40.0000.00719.53
8.2.30.0040.00419.30
8.2.20.0040.00418.10
8.2.10.0040.00418.09
8.2.00.0030.00617.62
8.1.300.0100.00019.59
8.1.290.0030.01030.84
8.1.280.0090.00925.92
8.1.270.0040.00420.32
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00424.02
8.1.230.0070.00420.88
8.1.220.0050.00317.91
8.1.210.0080.00018.77
8.1.200.0030.00617.48
8.1.190.0080.00017.23
8.1.180.0040.00718.10
8.1.170.0080.00018.59
8.1.160.0040.00418.87
8.1.150.0040.00418.96
8.1.140.0040.00420.68
8.1.130.0000.00720.19
8.1.120.0030.00317.50
8.1.110.0050.00217.40
8.1.100.0050.00217.34
8.1.90.0000.00717.40
8.1.80.0000.00817.46
8.1.70.0030.00517.45
8.1.60.0000.00817.47
8.1.50.0060.00317.46
8.1.40.0000.00817.41
8.1.30.0000.00817.57
8.1.20.0070.00317.54
8.1.10.0040.00417.51
8.1.00.0000.00917.46
8.0.300.0030.00619.77
8.0.290.0040.00416.75
8.0.280.0030.00518.36
8.0.270.0040.00417.29
8.0.260.0000.00620.17
8.0.250.0000.00716.96
8.0.240.0050.00316.85
8.0.230.0070.00016.96
8.0.220.0000.00716.81
8.0.210.0000.00716.87
8.0.200.0060.00016.81
8.0.190.0050.00316.98
8.0.180.0070.00016.79
8.0.170.0030.00516.86
8.0.160.0050.00316.97
8.0.150.0030.00316.77
8.0.140.0050.00216.75
8.0.130.0030.00313.32
8.0.120.0040.00416.82
8.0.110.0000.00816.73
8.0.100.0040.00416.83
8.0.90.0000.00716.66
8.0.80.0110.00716.86
8.0.70.0000.00716.87
8.0.60.0040.00416.95
8.0.50.0050.00216.88
8.0.30.0070.01017.06
8.0.20.0060.01217.40
8.0.10.0000.00816.78
8.0.00.0140.00516.84
7.4.330.0030.00315.55
7.4.320.0030.00316.57
7.4.300.0000.00716.38
7.4.290.0030.00616.48
7.4.280.0040.00416.58
7.4.270.0030.00316.60
7.4.260.0050.00216.52
7.4.250.0030.00316.52
7.4.240.0000.00716.57
7.4.230.0030.00316.51
7.4.220.0040.00416.40
7.4.210.0070.00916.53
7.4.200.0070.00016.62
7.4.160.0100.01016.49
7.4.140.0120.00717.86
7.4.130.0060.01116.48
7.4.120.0110.00816.47
7.4.110.0120.01216.41
7.4.100.0070.01016.47
7.4.90.0090.00916.59
7.4.80.0090.01519.39
7.4.70.0120.00316.50
7.4.60.0090.00916.55
7.4.50.0040.01416.66
7.4.40.0150.00316.41
7.4.00.0070.01015.05
7.3.330.0050.00013.26
7.3.320.0000.00513.15
7.3.310.0040.00416.31
7.3.300.0040.00416.31
7.3.290.0030.00316.31
7.3.280.0100.00816.25
7.3.260.0140.00716.50
7.3.240.0080.00916.48
7.3.230.0100.00716.57
7.3.210.0070.01016.67
7.3.200.0030.01216.41
7.3.190.0070.01116.39
7.3.180.0080.01516.39
7.3.170.0130.00716.40
7.3.160.0090.00616.52
7.3.120.0060.01014.79
7.3.110.0080.00914.84
7.3.100.0090.00514.83
7.3.90.0070.00814.64
7.3.80.0050.00814.90
7.3.70.0080.00514.81
7.3.60.0050.00714.82
7.3.50.0010.01214.85
7.3.40.0070.00614.73
7.3.30.0090.00614.60
7.3.20.0060.00816.63
7.3.10.0060.00716.73
7.3.00.0060.00616.71
7.2.330.0140.00616.77
7.2.320.0130.00316.73
7.2.310.0170.00616.45
7.2.300.0030.01316.41
7.2.290.0120.00916.63
7.2.250.0060.01215.22
7.2.240.0080.01015.25
7.2.230.0060.00815.06
7.2.220.0060.00815.07
7.2.210.0050.01114.92
7.2.200.0040.01015.15
7.2.190.0070.00814.98
7.2.180.0070.00815.06
7.2.170.0080.00715.07
7.2.130.0060.00316.68
7.2.120.0070.01016.94
7.2.110.0110.00416.89
7.2.100.0300.00715.81
7.2.90.0180.01115.95
7.2.80.0360.00615.95
7.2.70.0060.00916.08
7.2.60.0390.00516.10
7.2.50.0380.00515.97
7.2.40.0430.00615.88
7.2.30.0450.00315.86
7.2.20.0380.00716.03
7.2.10.0430.00516.01
7.2.00.0430.00816.04
7.1.330.0060.00915.80
7.1.320.0050.00715.85
7.1.310.0050.00715.81
7.1.300.0060.00815.76
7.1.290.0020.00815.83
7.1.280.0050.00715.89
7.1.270.0080.00615.84
7.1.260.0050.00715.84
7.1.250.0030.00715.60
7.1.220.0660.00713.96
7.1.210.0490.00313.89
7.1.200.0530.00314.00
7.1.190.0770.00313.69
7.1.180.0630.00713.90
7.1.170.0580.01313.86
7.1.160.0910.00713.89
7.1.150.0750.00913.65
7.1.140.0740.00713.88
7.1.130.0780.01013.82
7.1.120.0770.00914.05
7.1.110.0700.01013.54
7.1.100.0750.00013.86
7.1.90.0780.00613.88
7.1.80.0680.00714.00
7.1.70.0750.00013.77
7.1.60.0880.00731.77
7.1.50.2010.01731.81
7.1.40.1000.01031.86
7.1.30.0840.01331.79
7.1.20.1000.00331.98
7.1.10.0800.00313.84
7.1.00.0910.00013.95
5.6.380.0080.00814.44

preferences:
27.42 ms | 403 KiB | 5 Q