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.70.0140.00418.43
8.3.60.0120.00316.63
8.3.50.0090.00616.21
8.3.40.0150.00018.70
8.3.30.0040.01118.71
8.3.20.0070.00020.34
8.3.10.0070.00023.65
8.3.00.0040.00423.71
8.2.180.0140.00318.16
8.2.170.0110.00822.96
8.2.160.0060.00919.46
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00020.52
8.2.120.0080.00026.35
8.2.110.0040.00721.18
8.2.100.0080.00418.22
8.2.90.0000.00819.11
8.2.80.0030.00617.97
8.2.70.0060.00317.63
8.2.60.0080.00018.05
8.2.50.0000.00818.10
8.2.40.0000.00720.47
8.2.30.0000.00819.34
8.2.20.0050.00218.13
8.2.10.0040.00418.20
8.2.00.0040.00418.02
8.1.280.0070.00725.92
8.1.270.0040.00422.14
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0060.00619.53
8.1.230.0070.00320.32
8.1.220.0050.00317.77
8.1.210.0000.00818.77
8.1.200.0000.00817.22
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0040.00418.55
8.1.160.0050.00218.79
8.1.150.0040.00420.21
8.1.140.0020.00519.12
8.1.130.0000.00818.99
8.1.120.0000.01017.48
8.1.110.0060.00317.36
8.1.100.0030.00617.37
8.1.90.0000.00717.36
8.1.80.0040.00417.42
8.1.70.0030.00317.52
8.1.60.0060.00317.44
8.1.50.0030.00617.48
8.1.40.0080.00017.54
8.1.30.0040.00417.63
8.1.20.0000.00717.68
8.1.10.0040.00417.61
8.1.00.0030.00617.51
8.0.300.0050.00318.77
8.0.290.0000.00816.75
8.0.280.0040.00418.39
8.0.270.0000.00717.30
8.0.260.0000.00918.89
8.0.250.0030.00316.87
8.0.240.0030.00516.94
8.0.230.0000.00717.04
8.0.220.0000.00716.93
8.0.210.0030.00316.97
8.0.200.0040.00416.94
8.0.190.0030.00616.96
8.0.180.0070.00016.80
8.0.170.0050.00216.77
8.0.160.0000.00916.94
8.0.150.0080.00016.88
8.0.140.0030.00616.90
8.0.130.0000.00613.30
8.0.120.0050.00316.89
8.0.110.0000.00816.93
8.0.100.0070.00016.96
8.0.90.0040.00417.03
8.0.80.0090.00616.87
8.0.70.0040.00416.69
8.0.60.0000.00816.80
8.0.50.0070.00016.91
8.0.30.0100.00817.15
8.0.20.0100.01117.40
8.0.10.0000.00717.13
8.0.00.0060.01216.62
7.4.330.0000.00415.55
7.4.320.0030.00316.39
7.4.300.0060.00016.47
7.4.290.0070.00316.59
7.4.280.0040.00416.51
7.4.270.0040.00416.52
7.4.260.0000.00716.46
7.4.250.0040.00416.50
7.4.240.0040.00416.48
7.4.230.0000.00716.64
7.4.220.0100.01016.57
7.4.210.0070.01016.64
7.4.200.0030.00316.43
7.4.160.0080.00816.57
7.4.150.0000.02017.40
7.4.140.0160.00517.86
7.4.130.0030.01316.62
7.4.120.0090.01116.45
7.4.110.0090.00916.55
7.4.100.0090.00916.47
7.4.90.0100.00716.52
7.4.80.0080.01119.39
7.4.70.0100.00616.50
7.4.60.0040.01216.41
7.4.50.0100.00316.37
7.4.40.0140.01016.57
7.4.30.0090.00616.51
7.4.00.0110.00015.17
7.3.330.0030.00313.38
7.3.320.0000.00613.36
7.3.310.0000.00716.39
7.3.300.0040.00416.39
7.3.290.0080.00616.33
7.3.280.0060.00816.31
7.3.270.0100.00617.40
7.3.260.0120.01216.52
7.3.250.0100.00916.41
7.3.240.0100.00716.49
7.3.230.0030.01316.41
7.3.210.0060.01616.42
7.3.200.0030.01216.38
7.3.190.0030.01316.22
7.3.180.0070.00716.43
7.3.170.0060.00916.30
7.3.160.0160.00016.26
7.3.10.0040.00716.49
7.3.00.0070.00716.92
7.2.330.0160.00316.55
7.2.320.0060.01216.69
7.2.310.0060.01216.82
7.2.300.0150.00616.71
7.2.290.0070.01016.45
7.2.130.0030.00717.02
7.2.120.0080.00416.80
7.2.110.0100.00616.91
7.2.100.0030.00917.07
7.2.90.0030.00616.99
7.2.80.0070.00717.19
7.2.70.0030.00616.70
7.2.60.0140.00816.64
7.2.50.0070.00716.85
7.2.40.0130.00016.82
7.2.30.0070.01016.92
7.2.20.0000.01016.96
7.2.10.0000.01416.91
7.2.00.0060.00316.88
7.1.250.0070.00715.70
7.1.200.0100.00615.94
7.1.110.0780.01115.63
7.1.100.0690.00716.28
7.1.90.1290.01415.77
7.1.80.1240.00915.61
7.1.70.0900.00315.04
7.1.60.1460.01932.95
7.1.50.1050.01033.00
7.1.40.1040.02432.53
7.1.30.1630.02032.59
7.1.20.0980.01632.77
7.1.10.1810.02214.66
7.1.00.1520.01014.82
7.0.250.0840.01115.86
7.0.240.0720.00715.83
7.0.230.0980.01215.12
7.0.220.1000.01315.63
7.0.210.0630.01014.80
7.0.200.1460.00314.88
7.0.190.1360.00614.79
7.0.180.1300.01014.21
7.0.170.1330.00314.26
7.0.160.1990.01014.45
7.0.150.1110.01614.23
7.0.140.1030.01314.65
7.0.130.1340.00714.59
7.0.120.1350.01014.68
7.0.110.0810.01314.55
7.0.100.1120.00314.31
7.0.90.1320.01014.63
7.0.80.0590.01614.38
7.0.70.0870.01814.26
7.0.60.0880.00314.23
7.0.50.0820.01314.37
7.0.40.0940.00614.73
7.0.30.1070.00614.50
7.0.20.1160.01014.53
7.0.10.0790.00714.59
7.0.00.0840.00714.75

preferences:
65.46 ms | 401 KiB | 5 Q