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]."}}"; }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.70.0120.00316.63
8.3.60.0040.01117.00
8.3.50.0090.00616.30
8.3.40.0090.00618.80
8.3.30.0160.00018.67
8.3.20.0040.00420.33
8.3.10.0040.00423.71
8.3.00.0070.00023.65
8.2.180.0110.00718.54
8.2.170.0150.00019.07
8.2.160.0040.01222.96
8.2.150.0080.00025.66
8.2.140.0030.00624.66
8.2.130.0030.00526.16
8.2.120.0080.00021.11
8.2.110.0070.00320.82
8.2.100.0000.01218.28
8.2.90.0050.00319.27
8.2.80.0000.00817.97
8.2.70.0000.00917.62
8.2.60.0050.00218.05
8.2.50.0000.00818.10
8.2.40.0000.00720.63
8.2.30.0040.00419.25
8.2.20.0000.00718.19
8.2.10.0040.00418.02
8.2.00.0070.00018.07
8.1.280.0110.00425.92
8.1.270.0000.00822.23
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0110.00021.35
8.1.230.0040.00720.39
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0080.00017.23
8.1.190.0080.00017.35
8.1.180.0040.00418.10
8.1.170.0030.00518.59
8.1.160.0000.00718.84
8.1.150.0040.00420.21
8.1.140.0070.00019.09
8.1.130.0070.00019.04
8.1.120.0070.00317.49
8.1.110.0080.00017.52
8.1.100.0050.00317.49
8.1.90.0070.00017.52
8.1.80.0070.00317.52
8.1.70.0000.00717.50
8.1.60.0000.00817.59
8.1.50.0040.00417.55
8.1.40.0090.00017.57
8.1.30.0040.00417.68
8.1.20.0020.00517.66
8.1.10.0030.00617.59
8.1.00.0000.00817.43
8.0.300.0000.00818.77
8.0.290.0040.00416.88
8.0.280.0000.00718.54
8.0.270.0030.00317.32
8.0.260.0000.00618.85
8.0.250.0000.00717.02
8.0.240.0040.00417.01
8.0.230.0000.00716.90
8.0.220.0040.00417.00
8.0.210.0000.00716.96
8.0.200.0070.00017.07
8.0.190.0030.00717.01
8.0.180.0000.00816.89
8.0.170.0040.00417.06
8.0.160.0060.00316.98
8.0.150.0030.00516.89
8.0.140.0100.00016.96
8.0.130.0060.00013.36
8.0.120.0000.00816.90
8.0.110.0070.00016.88
8.0.100.0000.00716.76
8.0.90.0000.00817.00
8.0.80.0060.00817.01
8.0.70.0070.00016.92
8.0.60.0060.00316.91
8.0.50.0070.00016.82
8.0.30.0090.00817.09
8.0.20.0110.01017.40
8.0.10.0040.00417.21
8.0.00.0060.01216.84
7.4.330.0040.00015.55
7.4.320.0000.00616.55
7.4.300.0000.00616.64
7.4.290.0050.00516.41
7.4.280.0000.00716.54
7.4.270.0030.00316.63
7.4.260.0040.00416.50
7.4.250.0030.00316.44
7.4.240.0000.00816.68
7.4.230.0040.00316.43
7.4.220.0070.01416.64
7.4.210.0100.00416.64
7.4.200.0000.00716.37
7.4.160.0090.00616.57
7.4.150.0150.00917.40
7.4.140.0080.01317.86
7.4.130.0130.00416.50
7.4.120.0100.01216.50
7.4.110.0120.00616.55
7.4.100.0090.00616.53
7.4.90.0150.00416.58
7.4.80.0040.01419.39
7.4.70.0100.00716.61
7.4.60.0130.00316.62
7.4.50.0070.00716.34
7.4.40.0080.00816.30
7.4.30.0060.01016.79
7.4.10.0100.00615.00
7.4.00.0060.00815.13
7.3.330.0040.00413.30
7.3.320.0050.00013.17
7.3.310.0030.00316.49
7.3.300.0000.00716.45
7.3.290.0060.01016.37
7.3.280.0090.00616.36
7.3.270.0060.01217.40
7.3.260.0120.01116.50
7.3.250.0120.00916.61
7.3.240.0130.00416.54
7.3.230.0110.00716.40
7.3.210.0130.00816.51
7.3.200.0060.00916.50
7.3.190.0080.00816.52
7.3.180.0030.01216.45
7.3.170.0060.01016.57
7.3.160.0060.01216.47
7.3.130.0090.00914.80
7.3.120.0060.01014.93
7.3.110.0100.00814.76
7.3.100.0030.00915.00
7.3.90.0070.00714.91
7.3.80.0070.00514.94
7.3.70.0080.00514.77
7.3.60.0090.00514.85
7.3.50.0020.00914.65
7.3.40.0030.00614.95
7.3.30.0050.00814.58
7.3.20.0020.01016.63
7.3.10.0070.00616.84
7.3.00.0090.00616.84
7.2.330.0120.00616.85
7.2.320.0070.01016.38
7.2.310.0080.01416.43
7.2.300.0120.00816.48
7.2.290.0120.00616.79
7.2.260.0070.01115.16
7.2.250.0120.00715.11
7.2.240.0060.01015.16
7.2.230.0050.01215.06
7.2.220.0080.01115.15
7.2.210.0080.00815.07
7.2.200.0060.00515.03
7.2.190.0060.00614.98
7.2.180.0110.00515.13
7.2.170.0030.01015.17
7.2.160.0060.00615.13
7.2.150.0040.01117.16
7.2.140.0030.01016.90
7.2.130.0060.00916.93
7.2.120.0040.01116.77
7.2.110.0040.01117.15
7.2.100.0070.00717.10
7.2.90.0030.01316.97
7.2.80.0070.00717.12
7.2.70.0000.01116.88
7.2.60.0210.00616.99
7.2.50.0060.01317.01
7.2.40.0040.00816.91
7.2.30.0040.00716.97
7.2.20.0100.01017.10
7.2.10.0100.00317.14
7.2.00.0120.00017.09
7.1.330.0060.00715.93
7.1.320.0050.01015.73
7.1.310.0050.00715.88
7.1.300.0000.01415.64
7.1.290.0090.00515.90
7.1.280.0030.00915.83
7.1.270.0040.01015.61
7.1.260.0040.01115.76
7.1.250.0040.00415.61
7.1.240.0000.00915.94
7.1.230.0030.01015.93
7.1.220.0070.00715.47
7.1.210.0030.00915.63
7.1.200.0070.00115.77
7.1.190.0070.00715.57
7.1.180.0030.01415.71
7.1.170.0090.00915.91
7.1.160.0030.00915.80
7.1.150.0120.00315.89
7.1.140.0100.00015.89
7.1.130.0060.00915.65
7.1.120.0030.00615.55
7.1.110.0200.01015.73
7.1.100.0220.00615.99
7.1.90.0240.00716.05
7.1.80.0450.00815.69
7.1.70.0230.01315.65
7.1.60.0390.00524.63
7.1.50.0420.01024.47
7.1.40.0310.01224.28
7.1.30.0400.00724.30
7.1.20.0550.01024.29
7.1.10.0310.00815.26
7.1.00.0290.00815.29
7.0.330.0080.00315.39
7.0.320.0130.00015.39
7.0.310.0090.00615.41
7.0.300.0110.00315.49
7.0.290.0090.00315.23
7.0.280.0060.00915.49
7.0.270.0040.00715.33
7.0.260.0070.00315.43
7.0.250.0270.00815.41
7.0.240.0140.00915.39
7.0.230.0250.00715.19
7.0.220.0340.00915.62
7.0.210.0480.00715.23
7.0.200.0410.01215.18
7.0.190.0400.00515.11
7.0.180.0280.00814.90
7.0.170.0560.01014.81
7.0.160.0430.00714.95
7.0.150.0310.01114.75
7.0.140.0260.01314.86
7.0.130.0330.01015.19
7.0.120.0420.01115.21
7.0.110.0310.00914.99
7.0.100.0320.00814.99
7.0.90.0650.00814.82
7.0.80.0380.00814.90
7.0.70.0410.01214.89
7.0.60.0330.00714.81
7.0.50.0270.01015.01
7.0.40.0410.00614.02
7.0.30.0310.00914.23
7.0.20.0320.00813.91
7.0.10.0330.01013.96
7.0.00.0380.00713.89
5.6.400.0100.00714.58
5.6.390.0030.00614.36
5.6.380.0060.00314.39
5.6.370.0120.00014.59
5.6.360.0040.01214.62
5.6.350.0040.01114.61
5.6.340.0070.01014.84
5.6.330.0030.01014.52
5.6.320.0100.00314.26
5.6.310.0030.01314.60
5.6.300.0070.00714.33
5.6.290.0090.00314.44
5.6.280.0040.00714.54
5.6.270.0090.00614.41
5.6.260.0000.01414.69
5.6.250.0060.00314.50
5.6.240.0090.00014.29
5.6.230.0000.01414.41
5.6.220.0060.00314.17
5.6.210.0040.00814.41
5.6.200.0060.00914.51
5.6.190.0040.00714.16
5.6.180.0060.00914.60
5.6.170.0030.01014.16
5.6.160.0040.00414.33
5.6.150.0000.00914.20
5.6.140.0080.00314.63
5.6.130.0000.01314.48
5.6.120.0030.00914.18
5.6.110.0040.00414.83
5.6.100.0040.00414.46
5.6.90.0070.00314.27
5.6.80.0100.00314.37
5.6.70.0000.01114.35
5.6.60.0110.00314.31
5.6.50.0030.00914.36
5.6.40.0030.00614.27
5.6.30.0040.00714.39
5.6.20.0000.01414.48
5.6.10.0070.00714.27
5.6.00.0030.00814.23

preferences:
58.45 ms | 401 KiB | 5 Q