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[0])){ $out = $newjson2[0]."}}"; }else{ $newjson3 = explode("]}",$newjsonrightclean); $out = $newjson3[0]."]}"; } return $out; } echo $newjson2; 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.0120.00616.24
8.3.40.0070.00718.97
8.3.30.0070.00718.88
8.3.20.0070.00020.33
8.3.10.0000.00723.60
8.3.00.0040.00423.52
8.2.180.0180.00318.61
8.2.170.0190.00022.96
8.2.160.0100.00319.29
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0070.00020.57
8.2.120.0070.00026.35
8.2.110.0060.00321.04
8.2.100.0080.00417.97
8.2.90.0060.00319.17
8.2.80.0000.00817.97
8.2.70.0080.00317.75
8.2.60.0090.00018.04
8.2.50.0000.00718.10
8.2.40.0000.00720.64
8.2.30.0050.00219.40
8.2.20.0020.00518.13
8.2.10.0050.00218.15
8.2.00.0070.00018.15
8.1.280.0040.01125.92
8.1.270.0050.00321.95
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0100.00022.66
8.1.230.0050.00517.71
8.1.220.0000.00817.74
8.1.210.0070.00318.77
8.1.200.0070.00417.47
8.1.190.0060.00317.23
8.1.180.0040.00418.10
8.1.170.0050.00318.56
8.1.160.0000.00718.95
8.1.150.0020.00520.26
8.1.140.0040.00419.11
8.1.130.0000.00718.94
8.1.120.0050.00517.54
8.1.110.0020.00517.43
8.1.100.0040.00417.39
8.1.90.0030.00617.42
8.1.80.0040.00417.45
8.1.70.0000.00717.39
8.1.60.0030.00517.61
8.1.50.0040.00417.56
8.1.40.0000.00817.50
8.1.30.0080.00017.69
8.1.20.0040.00417.63
8.1.10.0040.00417.47
8.1.00.0000.00817.50
8.0.300.0030.00618.77
8.0.290.0000.00716.63
8.0.280.0000.00718.34
8.0.270.0050.00217.28
8.0.260.0030.00318.88
8.0.250.0030.00316.91
8.0.240.0040.00416.93
8.0.230.0000.00816.91
8.0.220.0040.00416.96
8.0.210.0030.00316.89
8.0.200.0030.00316.92
8.0.190.0040.00417.05
8.0.180.0040.00416.88
8.0.170.0000.00717.04
8.0.160.0000.00717.08
8.0.150.0000.00716.93
8.0.140.0040.00416.82
8.0.130.0000.00513.45
8.0.120.0000.00716.98
8.0.110.0070.00016.87
8.0.100.0000.00716.85
8.0.90.0030.00516.85
8.0.80.0030.01116.93
8.0.70.0000.00716.96
8.0.60.0030.00516.93
8.0.50.0000.00816.76
8.0.30.0110.00817.11
8.0.20.0120.00817.40
8.0.10.0080.00017.14
8.0.00.0160.00616.82
7.4.330.0020.00215.55
7.4.320.0000.00616.52
7.4.300.0000.00616.55
7.4.290.0080.00016.52
7.4.280.0040.00416.63
7.4.270.0000.00716.48
7.4.260.0030.00316.59
7.4.250.0070.00016.59
7.4.240.0000.00716.52
7.4.230.0040.00416.61
7.4.220.0100.01016.68
7.4.210.0000.01416.55
7.4.200.0040.00416.71
7.4.160.0080.00816.55
7.4.150.0150.00317.40
7.4.140.0090.01317.86
7.4.130.0060.01216.60
7.4.120.0100.01016.62
7.4.110.0080.00816.54
7.4.100.0150.00916.63
7.4.90.0090.00916.52
7.4.80.0100.00719.39
7.4.70.0100.00716.68
7.4.60.0060.00916.66
7.4.50.0090.00916.36
7.4.40.0080.00916.34
7.4.30.0090.00616.48
7.4.00.0060.00914.85
7.3.330.0030.00313.26
7.3.320.0030.00313.52
7.3.310.0060.00016.26
7.3.300.0000.00716.40
7.3.290.0070.00716.36
7.3.280.0080.00816.39
7.3.270.0100.01017.40
7.3.260.0150.00716.44
7.3.250.0070.01216.56
7.3.240.0100.00516.52
7.3.230.0100.00716.63
7.3.210.0100.00716.36
7.3.200.0090.00616.67
7.3.190.0080.00816.47
7.3.180.0090.00616.66
7.3.170.0120.00316.52
7.3.160.0090.00616.59
7.3.10.0040.01116.50
7.3.00.0040.01016.66
7.2.330.0090.01516.78
7.2.320.0130.00316.69
7.2.310.0140.00716.41
7.2.300.0070.01116.46
7.2.290.0030.01316.77
7.2.130.0030.01317.08
7.2.120.0080.00816.62
7.2.110.0060.00616.59
7.2.100.0090.00316.71
7.2.90.0060.01016.97
7.2.80.0050.00816.78
7.2.70.0060.00816.80
7.2.60.0100.00616.87
7.2.50.0070.00616.61
7.2.40.0040.01116.75
7.2.30.0060.00916.84
7.2.20.0070.01016.82
7.2.10.0050.00916.95
7.2.00.0090.00216.82
7.1.250.0070.00715.74
7.1.240.0000.01416.01
7.1.230.0070.00715.42
7.1.220.0070.00715.72
7.1.210.0000.01315.52
7.1.200.0050.00915.69
7.1.190.0070.00715.79
7.1.180.0090.00615.79
7.1.170.0090.00615.86
7.1.160.0040.00815.91
7.1.150.0080.00615.31
7.1.140.0030.00915.84
7.1.130.0080.00615.79
7.1.120.0030.01015.67
7.1.110.0610.01115.74
7.1.100.0610.01215.88
7.1.90.0430.00915.74
7.1.80.0380.01015.86
7.1.70.0440.00815.41
7.1.60.0500.00324.57
7.1.50.0750.01024.30
7.1.40.0520.00824.26
7.1.30.0560.01123.95
7.1.20.0470.01024.22
7.1.10.0820.01215.10
7.1.00.0310.01215.28
7.0.330.0100.00714.96
7.0.320.0190.00615.00
7.0.310.0130.00015.11
7.0.300.0040.00414.82
7.0.290.0090.00615.37
7.0.280.0040.01115.33
7.0.270.0080.00915.18
7.0.260.0100.00315.25
7.0.250.0480.00615.44
7.0.240.0670.00915.57
7.0.230.0420.00915.28
7.0.220.0450.00715.30
7.0.210.0400.01115.03
7.0.200.0680.00415.03
7.0.190.0610.00915.00
7.0.180.0680.00814.68
7.0.170.0560.00514.80
7.0.160.0660.00814.84
7.0.150.0520.00814.80
7.0.140.0350.01014.88
7.0.130.0490.01215.06
7.0.120.0310.01315.00
7.0.110.0380.00614.69
7.0.100.0460.00914.99
7.0.90.0390.00714.92
7.0.80.0310.01014.80
7.0.70.0450.00314.78
7.0.60.0490.01114.80
7.0.50.0290.01014.83
7.0.40.0480.00813.90
7.0.30.0510.00614.00
7.0.20.0300.01113.74
7.0.10.0360.01113.88
7.0.00.0340.00513.87
5.6.380.0050.00514.50

preferences:
47.21 ms | 400 KiB | 5 Q