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[1])){ $out = $newjson2[0]."}}"; return $out; }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.0150.00016.50
8.3.50.0000.01416.37
8.3.40.0110.00418.50
8.3.30.0130.00318.84
8.3.20.0040.00420.29
8.3.10.0000.00823.66
8.3.00.0000.00723.53
8.2.180.0110.01118.16
8.2.170.0140.00422.96
8.2.160.0000.01419.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0030.00520.58
8.2.120.0040.00426.35
8.2.110.0070.00319.30
8.2.100.0070.00418.11
8.2.90.0000.00819.30
8.2.80.0000.00817.97
8.2.70.0050.00317.63
8.2.60.0080.00017.93
8.2.50.0000.00818.22
8.2.40.0070.00020.55
8.2.30.0040.00419.38
8.2.20.0020.00518.20
8.2.10.0000.00718.11
8.2.00.0070.00018.16
8.1.280.0060.00925.92
8.1.270.0030.00522.07
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00319.28
8.1.230.0000.01120.42
8.1.220.0030.00517.74
8.1.210.0050.00318.77
8.1.200.0030.00617.22
8.1.190.0030.00617.23
8.1.180.0030.00618.10
8.1.170.0050.00318.64
8.1.160.0040.00418.92
8.1.150.0040.00420.10
8.1.140.0000.00719.02
8.1.130.0000.00819.02
8.1.120.0040.00617.38
8.1.110.0000.00817.45
8.1.100.0000.00817.50
8.1.90.0040.00417.48
8.1.80.0000.01017.49
8.1.70.0000.00817.45
8.1.60.0040.00417.64
8.1.50.0040.00417.43
8.1.40.0050.00317.43
8.1.30.0050.00317.58
8.1.20.0050.00217.72
8.1.10.0000.00817.67
8.1.00.0030.00617.42
8.0.300.0080.00018.77
8.0.290.0080.00016.75
8.0.280.0030.00318.38
8.0.270.0000.00817.23
8.0.260.0000.00718.82
8.0.250.0030.00417.00
8.0.240.0040.00416.93
8.0.230.0000.00716.98
8.0.220.0030.00316.93
8.0.210.0000.00716.95
8.0.200.0000.00716.83
8.0.190.0040.00416.94
8.0.180.0030.00616.93
8.0.170.0070.00016.96
8.0.160.0040.00416.93
8.0.150.0050.00316.84
8.0.140.0000.00816.94
8.0.130.0030.00313.33
8.0.120.0000.00816.77
8.0.110.0050.00216.92
8.0.100.0000.00716.88
8.0.90.0000.00716.92
8.0.80.0090.01316.88
8.0.70.0050.00316.96
8.0.60.0000.00716.98
8.0.50.0040.00416.75
8.0.30.0080.01217.04
8.0.20.0100.01117.40
8.0.10.0040.00416.82
8.0.00.0170.00016.72
7.4.330.0050.00015.55
7.4.320.0000.00616.64
7.4.300.0030.00316.52
7.4.290.0000.01016.63
7.4.280.0000.00716.63
7.4.270.0030.00316.65
7.4.260.0070.00016.62
7.4.250.0000.00716.48
7.4.240.0000.00816.67
7.4.230.0070.00016.52
7.4.220.0070.01016.62
7.4.210.0090.00616.57
7.4.200.0070.00016.65
7.4.160.0110.00516.56
7.4.150.0090.00917.40
7.4.140.0120.00817.86
7.4.130.0110.00516.37
7.4.120.0100.01116.59
7.4.110.0030.01416.47
7.4.100.0110.00616.47
7.4.90.0120.00616.56
7.4.80.0150.00319.39
7.4.70.0110.01116.62
7.4.60.0090.00716.49
7.4.50.0110.00716.69
7.4.40.0110.00516.29
7.4.30.0110.00616.75
7.4.00.0070.00614.84
7.3.330.0030.00313.24
7.3.320.0000.00513.43
7.3.310.0070.00016.42
7.3.300.0070.00016.26
7.3.290.0120.00516.31
7.3.280.0110.00716.30
7.3.270.0090.01417.40
7.3.260.0100.01116.41
7.3.250.0110.00716.35
7.3.240.0090.00816.30
7.3.230.0100.01016.30
7.3.210.0080.01216.44
7.3.200.0060.00916.27
7.3.190.0040.01116.65
7.3.180.0090.00616.41
7.3.170.0120.00416.35
7.3.160.0070.01016.30
7.3.120.0070.01115.04
7.3.110.0030.01014.86
7.3.100.0110.00414.69
7.3.90.0070.00714.98
7.3.80.0060.00314.72
7.3.70.0140.00414.87
7.3.60.0040.01414.83
7.3.50.0140.00314.49
7.3.40.0030.01014.90
7.3.30.0060.00314.56
7.3.20.0030.00916.64
7.3.10.0060.00616.45
7.3.00.0000.01116.45
7.2.330.0090.00916.50
7.2.320.0120.00616.48
7.2.310.0170.00316.56
7.2.300.0130.01016.77
7.2.290.0100.01016.76
7.2.250.0030.01615.20
7.2.240.0100.01015.27
7.2.230.0030.01314.85
7.2.220.0060.00815.32
7.2.210.0000.01515.30
7.2.200.0040.01115.02
7.2.190.0000.01015.22
7.2.180.0060.00614.80
7.2.170.0120.00315.00
7.2.60.0260.01116.54
7.1.330.0060.01015.71
7.1.320.0060.00615.93
7.1.310.0130.00315.90
7.1.300.0030.00515.87
7.1.290.0100.00315.80
7.1.280.0000.01415.73
7.1.270.0040.00715.75
7.1.260.0090.00615.68
7.1.200.0080.00415.98
7.1.110.0470.01016.23
7.1.100.0410.01415.71
7.1.90.0600.00616.09
7.1.80.0460.01015.82
7.1.70.0440.01015.04
7.1.60.0800.01333.17
7.1.50.0670.01032.85
7.1.40.0590.01632.61
7.1.30.0820.01032.67
7.1.20.0590.02232.66
7.1.10.0810.01015.00
7.1.00.0500.01015.02
7.0.250.0520.01215.51
7.0.240.0520.00916.09
7.0.230.0480.01015.32
7.0.220.0450.01015.32
7.0.210.0580.00714.85
7.0.200.0850.00314.83
7.0.190.1440.01014.66
7.0.180.0830.00614.29
7.0.170.0880.00714.47
7.0.160.0830.01614.09
7.0.150.0460.01514.32
7.0.140.0590.00414.37
7.0.130.0550.00914.71
7.0.120.0640.01014.79
7.0.110.0570.01014.41
7.0.100.0720.01014.59
7.0.90.0480.01414.58
7.0.80.0640.00714.50
7.0.70.0830.00814.29
7.0.60.0480.01314.24
7.0.50.0550.01014.34
7.0.40.0760.00714.35
7.0.30.0610.00314.35
7.0.20.0620.00714.42
7.0.10.0580.00614.44
7.0.00.0630.00714.48

preferences:
57.27 ms | 401 KiB | 5 Q