3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text ='{"success":true,"result":[{"product_id":"","faq_no":"FAQ1","faqcategories":"General","faqstatus":"Published","question":"\u062a\u0633\u062a \u062f\u0627\u0631\u061f","faq_answer":"\u0646\u062f\u0627\u0631\u062f","createdtime":"2017-11-20 08:35:47","modifiedtime":"2017-11-20 08:35:47","modifiedby":"19x1","source":"CRM","starred":"0","tags":"","id":"3x12"}]}'; function cleanjson($text){ $newjson = explode("{",$text); $newjsonrightclean="{".$newjson[1]."{".$newjson[2]; $newjson2 = explode("}}",$newjsonrightclean); if (!empty($newjson2)){ $out = $newjson2[0]."}}"; return $newjson2[0]; }else{ $newjson3 = explode("]}",$newjsonrightclean); $out = $newjson3[0]."]}"; return $out; } } echo cleanjson($text) ;

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.0120.00316.13
8.3.50.0090.00617.95
8.3.40.0040.01118.79
8.3.30.0040.01118.71
8.3.20.0040.00420.18
8.3.10.0030.00623.59
8.3.00.0070.00023.53
8.2.180.0110.01118.13
8.2.170.0030.01618.94
8.2.160.0100.00722.96
8.2.150.0080.00025.66
8.2.140.0000.00824.66
8.2.130.0080.00020.47
8.2.120.0070.00026.35
8.2.110.0040.00819.30
8.2.100.0000.01118.22
8.2.90.0000.00819.03
8.2.80.0040.00417.97
8.2.70.0080.00017.50
8.2.60.0070.00017.93
8.2.50.0000.00718.16
8.2.40.0050.00220.55
8.2.30.0070.00019.44
8.2.20.0040.00418.12
8.2.10.0000.00718.15
8.2.00.0000.00718.14
8.1.280.0140.00725.92
8.1.270.0040.00422.14
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0000.01021.42
8.1.230.0110.00020.30
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0040.00418.52
8.1.160.0040.00418.91
8.1.150.0040.00420.07
8.1.140.0040.00418.97
8.1.130.0050.00319.00
8.1.120.0060.00617.38
8.1.110.0030.00517.38
8.1.100.0000.00817.48
8.1.90.0070.00017.36
8.1.80.0070.00317.32
8.1.70.0040.00417.46
8.1.60.0050.00317.47
8.1.50.0000.00817.58
8.1.40.0040.00417.59
8.1.30.0000.00817.65
8.1.20.0030.00617.68
8.1.10.0050.00217.59
8.1.00.0070.00017.55
8.0.300.0060.00318.77
8.0.290.0000.00816.75
8.0.280.0070.00018.46
8.0.270.0030.00317.28
8.0.260.0060.00018.95
8.0.250.0030.00317.02
8.0.240.0070.00016.85
8.0.230.0030.00516.85
8.0.220.0000.00716.88
8.0.210.0030.00316.98
8.0.200.0030.00316.94
8.0.190.0000.00817.02
8.0.180.0040.00416.95
8.0.170.0070.00016.93
8.0.160.0040.00416.84
8.0.150.0030.00616.89
8.0.140.0000.00916.89
8.0.130.0050.00013.38
8.0.120.0000.00716.78
8.0.110.0040.00416.77
8.0.100.0000.00816.98
8.0.90.0030.00316.86
8.0.80.0070.00716.98
8.0.70.0040.00416.75
8.0.60.0040.00416.72
8.0.50.0040.00416.98
8.0.30.0090.00917.20
8.0.20.0100.00917.40
8.0.10.0000.00816.88
8.0.00.0070.01016.92
7.4.330.0000.00515.55
7.4.320.0030.00316.63
7.4.300.0000.00616.54
7.4.290.0030.00316.63
7.4.280.0050.00316.52
7.4.270.0070.00016.61
7.4.260.0050.00316.47
7.4.250.0030.00316.48
7.4.240.0090.00016.43
7.4.230.0040.00416.49
7.4.220.0180.00416.66
7.4.210.0080.01116.60
7.4.200.0000.00716.32
7.4.160.0100.01016.58
7.4.150.0110.00717.40
7.4.140.0140.00717.86
7.4.130.0120.00416.60
7.4.120.0120.00716.54
7.4.110.0090.00916.44
7.4.100.0100.00716.50
7.4.90.0120.00616.54
7.4.80.0060.01019.39
7.4.70.0100.00716.42
7.4.60.0030.01316.50
7.4.50.0100.00716.45
7.4.40.0120.00316.56
7.4.30.0100.00616.64
7.4.00.0030.01014.73
7.3.330.0030.00313.32
7.3.320.0050.00013.31
7.3.310.0040.00416.20
7.3.300.0040.00416.29
7.3.290.0080.01016.26
7.3.280.0060.01116.23
7.3.270.0120.00417.40
7.3.260.0100.00816.48
7.3.250.0130.00916.46
7.3.240.0110.00716.42
7.3.230.0030.01416.23
7.3.210.0120.00316.36
7.3.200.0080.01416.27
7.3.190.0150.00316.31
7.3.180.0060.00916.30
7.3.170.0030.01316.48
7.3.160.0130.00316.48
7.2.330.0110.00716.77
7.2.320.0110.00616.84
7.2.310.0150.00916.68
7.2.300.0070.01116.68
7.2.290.0060.01516.67
7.2.60.0200.00616.93
7.1.200.0030.00915.55
7.1.110.0490.01015.59
7.1.100.0640.00715.60
7.1.90.0570.00715.72
7.1.80.0990.01515.92
7.1.70.0630.01615.42
7.1.60.1170.01033.31
7.1.50.0850.01432.68
7.1.40.1210.02332.85
7.1.30.1090.01732.65
7.1.20.0860.01632.83
7.1.10.1030.00914.96
7.1.00.1060.01014.73
7.0.250.0650.01115.56
7.0.240.0910.01315.57
7.0.230.0520.01015.11
7.0.220.0750.00615.56
7.0.210.0740.00614.70
7.0.200.0690.00714.58
7.0.190.1600.01014.76
7.0.180.0770.00614.40
7.0.170.1210.01014.50
7.0.160.0700.01214.48
7.0.150.0540.01614.09
7.0.140.1070.01114.54
7.0.130.0910.01314.55
7.0.120.1010.01214.79
7.0.110.1410.01314.33
7.0.100.1160.01314.45
7.0.90.1060.01614.35
7.0.80.1060.01314.36
7.0.70.1030.01014.52
7.0.60.1150.01014.11
7.0.50.1120.00914.36
7.0.40.0970.01414.63
7.0.30.1400.01614.68
7.0.20.0860.00714.32
7.0.10.1340.01114.75
7.0.00.0940.01214.31

preferences:
65.2 ms | 400 KiB | 5 Q