3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Response represents an HTTP response in JSON format. * * Note that this class does not force the returned JSON content to be an * object. It is however recommended that you do return an object as it * protects yourself against XSSI and JSON-JavaScript Hijacking. * * @see https://www.owasp.org/index.php/OWASP_AJAX_Security_Guidelines#Always_return_JSON_with_an_Object_on_the_outside * * @author Igor Wiedler <igor@wiedler.ch> */ class JsonResponse { protected $data; protected $callback; protected $encodingOptions = JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT; }

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.0100.00318.18
8.3.50.0070.01222.05
8.3.40.0040.01118.74
8.3.30.0100.00718.96
8.3.20.0040.00420.33
8.3.10.0000.00822.15
8.3.00.0080.00022.32
8.2.180.0070.00716.38
8.2.170.0070.01022.96
8.2.160.0140.00018.91
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0060.00626.16
8.2.120.0060.00319.23
8.2.110.0060.00320.35
8.2.100.0090.00317.42
8.2.90.0020.00519.09
8.2.80.0000.00817.97
8.2.70.0060.00317.38
8.2.60.0030.00617.80
8.2.50.0030.00618.07
8.2.40.0040.00419.73
8.2.30.0040.00417.81
8.2.20.0040.00417.60
8.2.10.0040.00417.54
8.2.00.0080.00017.61
8.1.280.0130.00725.92
8.1.270.0040.00421.99
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0030.00623.91
8.1.230.0080.00420.98
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.11
8.1.190.0040.00417.41
8.1.180.0040.00418.67
8.1.170.0040.00418.65
8.1.160.0050.00322.13
8.1.150.0040.00418.43
8.1.140.0030.00617.33
8.1.130.0030.00317.70
8.1.120.0040.00417.36
8.1.110.0070.00017.34
8.1.100.0040.00417.34
8.1.90.0000.00717.29
8.1.80.0000.00717.34
8.1.70.0000.00717.29
8.1.60.0060.00317.44
8.1.50.0000.00717.36
8.1.40.0000.00817.36
8.1.30.0060.00317.36
8.1.20.0000.00817.52
8.1.10.0000.00717.25
8.1.00.0030.00617.31
8.0.300.0080.00018.77
8.0.290.0050.00316.93
8.0.280.0070.00018.26
8.0.270.0070.00017.13
8.0.260.0060.00016.62
8.0.250.0000.00816.80
8.0.240.0030.00316.68
8.0.230.0040.00416.72
8.0.220.0000.00616.73
8.0.210.0070.00016.67
8.0.200.0070.00016.81
8.0.190.0030.00316.84
8.0.180.0040.00416.75
8.0.170.0030.00516.78
8.0.160.0060.00316.80
8.0.150.0030.00316.76
8.0.140.0000.00816.70
8.0.130.0000.00513.16
8.0.120.0030.00516.60
8.0.110.0040.00416.71
8.0.100.0000.00816.70
8.0.90.0000.00716.59
8.0.80.0140.00716.83
8.0.70.0040.00416.81
8.0.60.0040.00416.67
8.0.50.0020.00516.63
8.0.30.0100.01117.04
8.0.20.0150.00517.40
8.0.10.0050.00216.83
8.0.00.0060.01116.52
7.4.330.0030.00315.00
7.4.320.0030.00316.39
7.4.300.0060.00016.36
7.4.290.0030.00316.46
7.4.280.0070.00016.38
7.4.270.0030.00316.47
7.4.260.0000.00716.43
7.4.250.0000.00716.48
7.4.240.0040.00416.38
7.4.230.0030.00316.45
7.4.220.0070.01316.46
7.4.210.0030.01216.46
7.4.200.0000.00716.59
7.4.190.0030.00316.37
7.4.160.0090.00616.13
7.4.150.0150.00317.40
7.4.140.0080.01317.86
7.4.130.0120.00716.36
7.4.120.0090.00816.42
7.4.110.0130.00316.31
7.4.100.0110.00716.52
7.4.90.0110.00816.39
7.4.80.0220.00019.39
7.4.70.0090.00916.45
7.4.60.0110.00616.32
7.4.50.0040.00416.29
7.4.40.0070.00722.77
7.4.30.0100.00716.48
7.4.00.0090.00615.04
7.3.330.0000.00512.99
7.3.320.0000.00513.17
7.3.310.0000.00716.01
7.3.300.0030.00316.04
7.3.290.0070.00716.16
7.3.280.0020.01416.17
7.3.270.0130.00717.40
7.3.260.0110.00616.36
7.3.250.0090.00916.19
7.3.240.0070.01016.17
7.3.230.0090.00616.39
7.3.210.0130.01016.30
7.3.200.0140.00719.39
7.3.190.0090.01216.41
7.3.180.0090.00616.31
7.3.170.0100.01016.27
7.3.160.0060.00916.34
7.3.120.0000.01014.86
7.2.330.0070.01016.16
7.2.320.0060.01216.46
7.2.310.0130.00316.23
7.2.300.0130.00616.20
7.2.290.0100.01016.24
7.2.00.0000.01119.29
7.1.100.0080.00418.05
7.1.70.0040.00416.60
7.1.60.0090.01619.82
7.1.50.0030.01016.95
7.1.00.0070.07022.30
7.0.200.0030.00516.61
7.0.140.0070.07321.95
7.0.60.0070.03720.04
7.0.50.0030.04317.96
7.0.40.0200.07720.40
7.0.30.0270.08720.06
7.0.20.0400.06320.07
7.0.10.0030.09020.34
7.0.00.0100.08320.25
5.6.280.0070.07021.06
5.6.210.0100.06720.53
5.6.200.0030.08318.18
5.6.190.0100.04020.39
5.6.180.0230.05020.50
5.6.170.0200.04020.51
5.6.160.0100.08020.44
5.6.150.0030.05318.20
5.6.140.0100.08018.17
5.6.130.0070.08018.27
5.6.120.0200.07021.01
5.6.110.0070.08321.07
5.6.100.0070.03721.13
5.6.90.0030.08720.96
5.6.80.0070.04020.41
5.5.350.0270.07720.41
5.5.340.0070.03317.95
5.5.330.0170.06720.37
5.5.320.0000.04320.35
5.5.310.0400.06320.26
5.5.300.0130.04717.94
5.5.290.0030.08717.91
5.5.280.0030.04020.98
5.5.270.0030.08720.76
5.5.260.0130.07720.72
5.5.250.0130.06020.75
5.5.240.0070.07320.03
5.4.450.0570.06019.46
5.4.440.0930.05319.34
5.4.430.0770.06719.19
5.4.420.0670.06019.57
5.4.410.0700.06019.26
5.4.400.0870.06719.02
5.4.390.0270.04719.27
5.4.380.0330.05718.50
5.4.370.0270.05318.59
5.4.360.0300.05718.48
5.4.350.0300.05718.63
5.4.340.0330.05318.79
5.4.320.0050.03712.51
5.4.310.0060.04312.51
5.4.300.0070.04312.51
5.4.290.0050.04212.50
5.4.280.0040.03912.41
5.4.270.0100.04212.41
5.4.260.0070.05018.92
5.4.250.0000.06019.00
5.4.240.0100.05319.10
5.4.230.0170.06019.04
5.4.220.0070.05318.94
5.4.210.0100.05018.96
5.4.200.0100.06319.10
5.4.190.0030.06719.00
5.4.180.0100.05318.84
5.4.170.0130.06319.04
5.4.160.0070.05718.78
5.4.150.0100.07018.99
5.4.140.0100.05316.37
5.4.130.0100.05316.48
5.4.120.0070.06716.48
5.4.110.0070.05316.56
5.4.100.0070.06316.42
5.4.90.0130.05716.52
5.4.80.0100.04716.61
5.4.70.0070.06016.38
5.4.60.0000.05716.39
5.4.50.0070.05316.45
5.4.40.0070.07316.52
5.4.30.0030.05016.39
5.4.20.0130.04716.40
5.4.10.0030.05716.33
5.4.00.0030.05315.86
5.3.290.0060.05012.80
5.3.280.0070.05714.77
5.3.270.0070.05714.82
5.3.260.0130.05014.75
5.3.250.0170.06014.43
5.3.240.0030.07714.77
5.3.230.0070.06314.68
5.3.220.0130.06314.65
5.3.210.0130.06014.54
5.3.200.0070.05314.39
5.3.190.0070.05314.47
5.3.180.0100.05314.55
5.3.170.0100.05314.64
5.3.160.0100.06314.53
5.3.150.0130.04714.55
5.3.140.0100.06014.39
5.3.130.0000.06014.63
5.3.120.0130.05014.61
5.3.110.0130.05014.55
5.3.100.0070.05013.94
5.3.90.0030.05314.10
5.3.80.0070.06014.08
5.3.70.0030.06014.03
5.3.60.0170.05714.08
5.3.50.0070.05314.04
5.3.40.0170.05014.11
5.3.30.0030.05013.92
5.3.20.0070.06013.77
5.3.10.0100.04313.47
5.3.00.0070.05713.77

preferences:
41.06 ms | 401 KiB | 5 Q