3v4l.org

run code in 300+ PHP versions simultaneously
<?php $an_object = new StdClass(); $an_object->attr = 'value'; $encoded = json_encode($an_object); print_r( json_decode($encoded, null, 512, JSON_OBJECT_AS_ARRAY)); print_r( json_decode($encoded, true, 512, JSON_OBJECT_AS_ARRAY)); print_r( json_decode($encoded, false, 512, JSON_OBJECT_AS_ARRAY));

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.4.10.0040.00420.32
8.3.140.0090.00916.68
8.3.130.0100.01016.50
8.3.120.0000.00818.83
8.3.110.0000.00916.41
8.3.100.0060.00318.34
8.3.90.0050.00316.54
8.3.80.0070.00316.50
8.3.70.0160.00316.58
8.3.60.0110.00818.43
8.3.50.0140.00418.08
8.3.40.0070.01118.83
8.3.30.0120.00618.72
8.3.20.0000.00819.04
8.3.10.0070.00021.89
8.3.00.0050.00519.56
8.2.260.0110.00716.74
8.2.250.0070.01116.55
8.2.240.0090.01217.44
8.2.230.0040.00420.94
8.2.220.0030.00637.54
8.2.210.0110.00426.77
8.2.200.0060.00316.50
8.2.190.0110.01116.58
8.2.180.0150.00325.92
8.2.170.0120.00922.96
8.2.160.0070.00718.79
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0000.00819.24
8.2.110.0110.01120.52
8.2.100.0100.00918.48
8.2.90.0000.00718.03
8.2.80.0030.00519.17
8.2.70.0050.00317.91
8.2.60.0040.00417.91
8.2.50.0130.00318.10
8.2.40.0080.00518.68
8.2.30.0050.00718.78
8.2.20.0100.00217.99
8.2.10.0070.00618.08
8.2.00.0050.00718.79
8.1.300.0090.00618.44
8.1.290.0060.00330.84
8.1.280.0090.00625.92
8.1.270.0030.00623.75
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0030.00622.09
8.1.230.0060.00622.21
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0060.00317.25
8.1.190.0030.00617.35
8.1.180.0050.00618.10
8.1.170.0080.00418.32
8.1.160.0080.00318.45
8.1.150.0050.00618.47
8.1.140.0090.00217.85
8.1.130.0080.00418.52
8.1.120.0070.00517.75
8.1.110.0070.00517.70
8.1.100.0080.00617.75
8.1.90.0050.00717.71
8.1.80.0090.00417.73
8.1.70.0100.00217.74
8.1.60.0060.00617.71
8.1.50.0040.00717.69
8.1.40.0050.00717.70
8.1.30.0070.00717.69
8.1.20.0090.00417.63
8.1.10.0100.00617.58
8.1.00.0130.00317.54
8.0.300.0000.00819.90
8.0.290.0000.00716.63
8.0.280.0120.00018.20
8.0.270.0080.00417.41
8.0.260.0130.00017.61
8.0.250.0100.00217.52
8.0.240.0080.00417.45
8.0.230.0110.00217.51
8.0.220.0080.00317.46
8.0.210.0060.00617.49
8.0.200.0050.00617.50
8.0.190.0010.01017.31
8.0.180.0080.00417.19
8.0.170.0100.00317.14
8.0.160.0090.00617.00
8.0.150.0100.00516.90
8.0.140.0100.00516.89
8.0.130.0080.00616.22
8.0.120.0070.00716.98
8.0.110.0090.00616.91
8.0.100.0100.00416.92
8.0.90.0080.00516.92
8.0.80.0100.00716.96
8.0.70.0080.00616.97
8.0.60.0100.00416.96
8.0.50.0100.00317.03
8.0.30.0110.00617.01
8.0.20.0120.00517.16
8.0.10.0130.00617.15
8.0.00.0090.00716.98
7.4.330.0080.00116.82
7.4.320.0070.00317.29
7.4.300.0060.00517.35
7.4.290.0060.00416.91
7.4.280.0090.00416.82
7.4.270.0120.00316.70
7.4.260.0080.00716.78
7.4.250.0100.00716.71
7.4.240.0100.00416.71
7.4.230.0110.00316.75
7.4.220.0090.00516.64
7.4.210.0100.00616.64
7.4.200.0090.00416.69
7.4.190.0110.00416.75
7.4.180.0100.00416.78
7.4.160.0090.00616.60
7.4.150.0120.00316.63
7.4.140.0100.00917.17
7.4.130.0120.00516.53
7.4.120.0120.00616.49
7.4.110.0110.00616.51
7.4.100.0090.00916.59
7.4.90.0130.00516.59
7.4.80.0120.00516.88
7.4.70.0140.00416.43
7.4.60.0100.00816.51
7.4.50.0140.00516.49
7.4.40.0120.00516.47
7.4.30.0120.00816.49
7.4.20.0100.00716.49
7.4.10.0110.00616.51
7.4.00.0110.00716.53
7.3.330.0090.00615.85
7.3.320.0110.00415.92
7.3.310.0110.00316.56
7.3.300.0090.00516.51
7.3.290.0100.00416.46
7.3.280.0090.00616.43
7.3.270.0120.00416.51
7.3.260.0090.00716.44
7.3.250.0130.00616.48
7.3.240.0130.00516.45
7.3.230.0140.00516.42
7.3.220.0160.00416.45
7.3.210.0120.00616.43
7.3.200.0110.00716.42
7.3.190.0120.00716.40
7.3.180.0120.00716.43
7.3.170.0130.00616.42
7.3.160.0130.00716.41
7.3.150.0120.00716.44
7.3.140.0130.00616.39
7.3.130.0110.00816.42
7.3.120.0120.00616.21
7.3.110.0120.00816.17
7.3.100.0110.00816.19
7.3.90.0120.00516.31
7.3.80.0120.00616.25
7.3.70.0110.00616.22
7.3.60.0120.00516.32
7.3.50.0120.00516.31
7.3.40.0100.00716.33
7.3.30.0130.00516.13
7.3.20.0200.00516.82
7.3.10.0150.00716.77
7.3.00.0170.00816.72
7.2.340.0130.00616.98
7.2.330.0110.00816.55
7.2.320.0120.00616.55
7.2.310.0140.00516.53
7.2.300.0130.00616.52
7.2.290.0120.00916.61
7.2.280.0120.00716.55
7.2.270.0120.00517.17
7.2.260.0120.00816.53
7.2.250.0130.00516.40
7.2.240.0110.00716.31
7.2.230.0120.00616.38
7.2.220.0100.00816.40
7.2.210.0110.00616.41
7.2.200.0130.00516.46
7.2.190.0120.00716.46
7.2.180.0090.00916.42
7.2.170.0140.00516.44
7.2.160.0120.00616.46
7.2.150.0200.00616.99
7.2.140.0180.00717.07
7.2.130.0260.00717.05
7.2.120.0220.00517.08
7.2.110.0200.00817.04
7.2.100.0140.00716.97
7.2.90.0120.00717.00
7.2.80.0260.00717.04
7.2.70.0150.00717.05
7.2.60.0160.00717.02
7.2.50.0180.00617.00
7.2.40.0220.00717.15
7.2.30.0260.00617.11
7.2.20.0210.00817.09
7.2.10.0270.00817.07
7.2.00.0220.00817.09
7.1.330.0130.00416.48
7.1.320.0150.00516.25
7.1.310.0090.00816.30
7.1.300.0150.00816.34
7.1.290.0120.00716.25
7.1.280.0110.00716.25
7.1.270.0170.00516.04
7.1.260.0250.00716.04
7.1.250.0130.00715.98
7.1.240.0250.00716.10
7.1.230.0150.00716.07
7.1.220.0150.00616.06
7.1.210.0150.00416.09
7.1.200.0220.00715.98
7.1.190.0180.00616.04
7.1.180.0170.00716.01
7.1.170.0170.00616.04
7.1.160.0220.00916.07
7.1.150.0290.00516.10
7.1.140.0240.00516.10
7.1.130.0210.00816.06
7.1.120.0260.00716.11
7.1.110.0250.00715.98
7.1.100.0220.00616.03
7.1.90.0250.00616.04
7.1.80.0240.00716.03
7.1.70.0230.00615.86
7.1.60.0280.00818.98
7.1.50.0270.00618.89
7.1.40.0250.00718.84
7.1.30.0270.00718.94
7.1.20.0300.00618.88
7.1.10.0250.00815.88
7.1.00.0230.00615.87
7.0.330.0190.00715.71
7.0.320.0170.00615.74
7.0.310.0160.00715.77
7.0.300.0200.00715.70
7.0.290.0200.00615.76
7.0.280.0180.00615.73
7.0.270.0190.00515.79
7.0.260.0190.00515.80
7.0.250.0210.00715.83
7.0.240.0160.00715.83
7.0.230.0170.00615.81
7.0.220.0200.00715.76
7.0.210.0180.00515.74
7.0.200.0310.00615.76
7.0.190.0150.00815.83
7.0.180.0160.00715.76
7.0.170.0180.00615.83
7.0.160.0160.00715.75
7.0.150.0180.00715.78
7.0.140.0190.00715.78
7.0.130.0160.00815.83
7.0.120.0190.00815.74
7.0.110.0190.00615.75
7.0.100.0210.00515.73
7.0.90.0190.00615.73
7.0.80.0160.00715.70
7.0.70.0230.00715.72
7.0.60.0180.00615.73
7.0.50.0200.00515.71
7.0.40.0180.00815.76
7.0.30.0200.00715.78
7.0.20.0160.00815.66
7.0.10.0170.00615.64
7.0.00.0200.00515.69
5.6.400.0140.00715.89
5.6.390.0140.00715.99
5.6.380.0120.00715.81
5.6.370.0130.00715.91
5.6.360.0120.00715.95
5.6.350.0130.00615.93
5.6.340.0150.00815.93
5.6.330.0120.00915.95
5.6.320.0120.00915.87
5.6.310.0130.00715.98
5.6.300.0120.01216.35
5.6.290.0140.01016.33
5.6.280.0130.01216.36
5.6.270.0140.01116.42
5.6.260.0150.01116.35
5.6.250.0130.01216.28
5.6.240.0110.01316.34
5.6.230.0120.01216.34
5.6.220.0150.01016.37
5.6.210.0110.01416.32
5.6.200.0120.01216.38
5.6.190.0130.01316.44
5.6.180.0130.01216.37
5.6.170.0120.01416.37
5.6.160.0130.01116.42
5.6.150.0170.00916.29
5.6.140.0140.01216.43
5.6.130.0150.01116.34
5.6.120.0130.01116.31
5.6.110.0110.01316.31
5.6.100.0140.01216.33
5.6.90.0120.01316.35
5.6.80.0130.00916.27
5.6.70.0120.01216.32
5.6.60.0120.01116.29
5.6.50.0100.01316.20
5.6.40.0130.01116.23
5.6.30.0120.01016.20
5.6.20.0100.01216.21
5.6.10.0110.01416.17
5.6.00.0130.01016.22

preferences:
35.75 ms | 403 KiB | 5 Q