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 ($newjson2[0] != ''){ $out = $newjson2[0]."}}"; }else{ $newjson2 = explode("]}",$newjsonrightclean); $out = $newjson2[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.0070.00716.75
8.3.50.0100.01018.04
8.3.40.0040.01118.70
8.3.30.0120.00318.71
8.3.20.0000.00720.16
8.3.10.0040.00423.36
8.3.00.0000.00723.48
8.2.180.0170.00318.29
8.2.170.0130.00618.96
8.2.160.0060.00622.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0040.00420.21
8.2.120.0070.00026.35
8.2.110.0030.00622.29
8.2.100.0090.00317.91
8.2.90.0000.00919.21
8.2.80.0000.00918.05
8.2.70.0050.00317.61
8.2.60.0040.00417.93
8.2.50.0040.00418.28
8.2.40.0000.00820.49
8.2.30.0060.00319.39
8.2.20.0040.00418.16
8.2.10.0020.00518.02
8.2.00.0070.00018.23
8.1.280.0110.00725.92
8.1.270.0040.00422.01
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0050.00523.99
8.1.230.0130.00317.83
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0040.00417.22
8.1.180.0030.00518.10
8.1.170.0000.00818.64
8.1.160.0040.00418.93
8.1.150.0000.00720.15
8.1.140.0000.00819.01
8.1.130.0000.00719.04
8.1.120.0040.00717.51
8.1.110.0040.00417.44
8.1.100.0030.00517.37
8.1.90.0040.00417.49
8.1.80.0030.00717.50
8.1.70.0000.00717.49
8.1.60.0000.00817.54
8.1.50.0000.00717.57
8.1.40.0000.00717.55
8.1.30.0050.00317.72
8.1.20.0000.00817.59
8.1.10.0060.00317.51
8.1.00.0000.00717.55
8.0.300.0050.00318.77
8.0.290.0060.00316.63
8.0.280.0000.00718.46
8.0.270.0040.00417.33
8.0.260.0030.00318.89
8.0.250.0000.00716.93
8.0.240.0040.00416.86
8.0.230.0070.00016.94
8.0.220.0070.00016.91
8.0.210.0000.00716.93
8.0.200.0030.00517.00
8.0.190.0050.00316.98
8.0.180.0080.00016.96
8.0.170.0030.00316.84
8.0.160.0070.00016.81
8.0.150.0000.00816.91
8.0.140.0080.00316.79
8.0.130.0030.00313.43
8.0.120.0000.00816.85
8.0.110.0040.00416.91
8.0.100.0080.00016.90
8.0.90.0000.00716.95
8.0.80.0090.00616.88
8.0.70.0050.00316.88
8.0.60.0080.00016.80
8.0.50.0050.00316.92
8.0.30.0110.00817.01
8.0.20.0100.01017.41
8.0.10.0000.00716.97
8.0.00.0070.01116.84
7.4.330.0000.00415.55
7.4.320.0000.00616.48
7.4.300.0030.00316.57
7.4.290.0040.00416.42
7.4.280.0080.00016.61
7.4.270.0000.00716.53
7.4.260.0030.00316.66
7.4.250.0070.00016.51
7.4.240.0000.00816.58
7.4.230.0050.00316.61
7.4.220.0070.01016.68
7.4.210.0120.00316.52
7.4.200.0070.00016.70
7.4.160.0090.00916.57
7.4.150.0150.00317.40
7.4.140.0070.01317.86
7.4.130.0030.01316.43
7.4.120.0110.00716.59
7.4.110.0120.00316.57
7.4.100.0090.00916.70
7.4.90.0150.00316.46
7.4.80.0090.00919.39
7.4.70.0060.01016.48
7.4.60.0040.01116.54
7.4.50.0100.00416.19
7.4.40.0080.00816.28
7.4.30.0090.00616.69
7.4.00.0000.01514.89
7.3.330.0000.00613.31
7.3.320.0030.00313.31
7.3.310.0000.00616.27
7.3.300.0030.00316.18
7.3.290.0100.00516.26
7.3.280.0080.00816.29
7.3.270.0100.00917.40
7.3.260.0120.00716.46
7.3.250.0090.00816.40
7.3.240.0100.00716.48
7.3.230.0110.00616.29
7.3.210.0140.00416.39
7.3.200.0060.01016.38
7.3.190.0060.00916.39
7.3.180.0090.00616.37
7.3.170.0040.01216.33
7.3.160.0110.00716.36
7.2.330.0070.01116.68
7.2.320.0100.00716.44
7.2.310.0150.00616.84
7.2.300.0070.01816.84
7.2.290.0070.01016.45
7.2.60.0190.00916.55
7.1.200.0030.00615.70
7.1.110.0710.00415.89
7.1.100.0650.00316.32
7.1.90.1150.01215.97
7.1.80.0110.01116.23
7.1.70.0330.01215.37
7.1.60.0520.02133.18
7.1.50.1460.00932.92
7.1.40.1720.01032.80
7.1.30.1760.02232.59
7.1.20.1380.00732.75
7.1.10.1120.01014.63
7.1.00.1050.00914.76
7.0.250.0550.00715.72
7.0.240.0420.01415.40
7.0.230.0580.01215.52
7.0.220.0450.01215.60
7.0.210.0150.01214.87
7.0.200.1320.00814.92
7.0.190.1270.01214.90
7.0.180.0760.01014.41
7.0.170.0870.00614.30
7.0.160.1900.00714.53
7.0.150.0860.01014.54
7.0.140.0650.01414.32
7.0.130.0650.00614.58
7.0.120.0620.00314.63
7.0.110.0650.00914.64
7.0.100.1200.01014.64
7.0.90.1000.00314.57
7.0.80.1300.01714.43
7.0.70.0730.01214.17
7.0.60.0850.01114.25
7.0.50.0550.00714.39
7.0.40.0520.00714.50
7.0.30.0580.00714.52
7.0.20.1160.01314.72
7.0.10.0710.01014.72
7.0.00.1040.00714.44

preferences:
30.96 ms | 400 KiB | 5 Q