3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = json_encode(['end' => json_decode(null, true)]); var_dump($result); class A implements \JsonSerializable { function jsonSerialize() { return ['end' => json_decode(null, true)]; } } $a = new A(); $toJsonData = $a->jsonSerialize(); $result = json_encode($a); var_dump($result); $result = json_encode($toJsonData); var_dump($result);

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.0120.00616.75
8.3.50.0150.00721.14
8.3.40.0000.01518.59
8.3.30.0070.00718.63
8.3.20.0080.00018.77
8.3.10.0000.00821.78
8.3.00.0030.00517.80
8.2.180.0180.00425.92
8.2.170.0140.00722.96
8.2.160.0070.00719.19
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0040.00421.13
8.2.120.0050.00326.35
8.2.110.0000.00922.26
8.2.100.0060.00617.97
8.2.90.0080.00017.75
8.2.80.0100.00018.73
8.2.70.0040.00417.63
8.2.60.0000.00917.50
8.2.50.0000.00817.93
8.2.40.0040.00419.65
8.2.30.0000.00718.07
8.2.20.0030.00517.82
8.2.10.0000.00818.19
8.2.00.0040.00418.06
8.1.280.0090.01225.92
8.1.270.0040.00423.82
8.1.260.0030.00628.09
8.1.250.0000.00828.09
8.1.240.0070.00320.20
8.1.230.0070.00317.83
8.1.220.0030.00517.78
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0080.00017.23
8.1.180.0040.00418.89
8.1.170.0000.00717.62
8.1.160.0000.00722.11
8.1.150.0000.00818.65
8.1.140.0040.00419.46
8.1.130.0000.00717.70
8.1.120.0040.00417.39
8.1.110.0000.00817.50
8.1.100.0050.00317.45
8.1.90.0040.00417.42
8.1.80.0060.00217.45
8.1.70.0000.00717.39
8.1.60.0050.00217.59
8.1.50.0030.00617.54
8.1.40.0030.00617.50
8.1.30.0030.00517.65
8.1.20.0040.00417.63
8.1.10.0000.00817.53
8.1.00.0000.00817.45
8.0.300.0000.00718.95
8.0.290.0040.00416.75
8.0.280.0050.00418.45
8.0.270.0000.00717.26
8.0.260.0040.00417.18
8.0.250.0050.00316.89
8.0.240.0070.00016.86
8.0.230.0070.00316.96
8.0.220.0070.00016.90
8.0.210.0000.00716.90
8.0.200.0070.00016.86
8.0.190.0000.00817.01
8.0.180.0040.00416.83
8.0.170.0050.00316.93
8.0.160.0000.00716.95
8.0.150.0040.00416.81
8.0.140.0000.00816.89
8.0.130.0030.00313.30
8.0.120.0040.00416.78
8.0.110.0070.00016.91
8.0.100.0000.00816.91
8.0.90.0040.00416.69
8.0.80.0170.00016.84
8.0.70.0000.00716.84
8.0.60.0040.00416.73
8.0.50.0030.00516.92
8.0.30.0150.00317.11
8.0.20.0140.00717.40
8.0.10.0040.00416.90
8.0.00.0110.01116.74
7.4.330.0020.00215.20
7.4.320.0030.00316.61
7.4.300.0030.00316.52
7.4.290.0030.00316.59
7.4.280.0070.00016.62
7.4.270.0050.00316.60
7.4.260.0040.00416.36
7.4.250.0000.00816.49
7.4.240.0020.00516.63
7.4.230.0030.00316.40
7.4.220.0130.01016.61
7.4.210.0140.00416.72
7.4.200.0040.00416.62
7.4.160.0150.00016.34
7.4.150.0100.00717.40
7.4.140.0060.01217.86
7.4.130.0110.00816.39
7.4.120.0100.00916.38
7.4.110.0120.00616.49
7.4.100.0070.01016.39
7.4.90.0100.00716.38
7.4.80.0060.01417.97
7.4.70.0050.01116.29
7.4.60.0120.00516.32
7.4.50.0080.00816.35
7.4.40.0100.00816.49
7.4.30.0080.01216.54
7.4.20.0160.00616.40
7.4.10.0100.00716.28
7.4.00.0140.00315.47
7.3.330.0000.00713.29
7.3.320.0000.00513.14
7.3.310.0000.00716.21
7.3.300.0030.00316.32
7.3.290.0080.01016.31
7.3.280.0070.01216.30
7.3.270.0080.00817.40
7.3.260.0140.00316.50
7.3.250.0080.00916.41
7.3.240.0090.00816.35
7.3.230.0070.01016.39
7.3.220.0090.00916.35
7.3.210.0100.00816.33
7.3.200.0110.00916.27
7.3.190.0080.00816.31
7.3.180.0130.00516.41
7.3.170.0110.00516.36
7.3.160.0070.00916.32
7.3.150.0070.01516.01
7.3.140.0090.00916.30
7.3.130.0070.01116.21
7.3.120.0090.01316.22
7.3.110.0100.01016.43
7.3.100.0030.01315.99
7.3.90.0080.01616.25
7.3.80.0090.00916.16
7.3.70.0090.01016.30
7.3.60.0100.00716.08
7.3.50.0130.00916.03
7.3.40.0100.01316.23
7.3.30.0170.00316.30
7.3.20.0070.01716.02
7.3.10.0180.00016.25
7.3.00.0200.01616.10
7.2.330.0050.01116.36
7.2.320.0100.01016.61
7.2.310.0120.00916.35
7.2.300.0050.01316.54
7.2.290.0110.00816.59
7.2.280.0100.01316.57
7.2.270.0140.00916.26
7.2.260.0090.00916.29
7.2.250.0120.01216.25
7.2.240.0130.01016.39
7.2.230.0090.00916.52
7.2.220.0200.00416.24
7.2.210.0070.01016.28
7.2.200.0090.01516.65
7.2.190.0100.01316.38
7.2.180.0120.01216.44
7.2.170.0090.01516.52
7.2.160.0090.00916.18
7.2.150.0170.00816.61
7.2.140.0090.00916.24
7.2.130.0110.01116.38
7.2.120.0090.01616.53
7.2.110.0140.00716.64
7.2.100.0380.01016.36
7.2.90.0090.00916.40
7.2.80.0070.01716.73
7.2.70.0210.00716.54
7.2.60.0140.00516.67
7.2.50.0140.00916.41
7.2.40.0160.00616.36
7.2.30.0060.01316.56
7.2.20.0440.00316.42
7.2.10.0150.00316.19
7.2.00.0120.01216.44
7.1.330.0310.00315.46
7.1.320.0260.01115.44
7.1.310.0270.00715.52
7.1.300.0270.00915.50
7.1.290.0250.00915.50
7.1.280.0220.00915.66
7.1.270.0280.00815.49
7.1.260.0170.01415.44
7.1.250.0230.00715.52
7.1.240.0250.00415.48
7.1.230.0240.00615.54
7.1.220.0220.00615.52
7.1.210.0260.00815.50
7.1.200.0150.00715.64
7.1.190.0290.00915.45
7.1.180.0280.00615.44
7.1.170.0240.00715.51
7.1.160.0290.00915.47
7.1.150.0170.01715.40
7.1.140.0220.00615.50
7.1.130.0260.01015.52
7.1.120.0280.00815.50
7.1.110.0280.00015.65
7.1.100.0230.00715.52
7.1.90.0200.01215.58
7.1.80.0260.00415.50
7.1.70.0140.00516.29
7.1.60.0140.01016.31
7.1.50.0150.00916.23
7.1.40.0280.01016.17
7.1.30.0120.01016.09
7.1.20.0150.01216.14
7.1.10.0150.00416.12
7.1.00.0130.00516.09
7.0.330.0250.01015.29
7.0.320.0260.00615.23
7.0.310.0170.01815.10
7.0.300.0190.01415.20
7.0.290.0230.00615.18
7.0.280.0260.00315.15
7.0.270.0200.00815.32
7.0.260.0200.00715.11
7.0.250.0200.00815.34
7.0.240.0150.01215.18
7.0.230.0290.00015.44
7.0.220.0180.01115.34
7.0.210.0190.01315.23
7.0.200.0090.01315.81
7.0.190.0120.00916.01
7.0.180.0160.00415.87
7.0.170.0100.00915.69
7.0.160.0140.00615.70
7.0.150.0120.00815.79
7.0.140.0160.00415.88
7.0.130.0110.00915.74
7.0.120.0100.00715.87
7.0.110.0110.00915.88
7.0.100.0100.00715.84
7.0.90.0110.00715.81
7.0.80.0060.01215.76
7.0.70.0130.00615.75
7.0.60.0140.00415.74
7.0.50.0150.01015.82
7.0.40.0120.01114.99
7.0.30.0220.01115.07
7.0.20.0160.00114.96
7.0.10.0110.00714.94
7.0.00.0110.00714.91
5.6.400.0230.01015.89
5.6.390.0220.01115.82
5.6.380.0080.02115.70
5.6.370.0280.00715.96
5.6.360.0260.01015.77
5.6.350.0210.01215.98
5.6.340.0130.01716.07
5.6.330.0120.01315.71
5.6.320.0280.00416.18
5.6.310.0300.00016.00
5.6.300.0090.02918.48
5.6.290.0150.02818.45
5.6.280.0100.02718.48
5.6.270.0110.02818.48
5.6.260.0140.02518.47
5.6.250.0150.02318.58
5.6.240.0150.03618.48
5.6.230.0110.02918.48
5.6.220.0170.02418.26
5.6.210.0110.04218.43
5.6.200.0150.02518.48
5.6.190.0140.02418.41
5.6.180.0140.03018.40
5.6.170.0120.02818.48
5.6.160.0200.02018.33
5.6.150.0110.02618.45
5.6.140.0090.05018.57
5.6.130.0130.04718.36
5.6.120.0100.03018.54
5.6.110.0080.02718.32
5.6.100.0110.02518.40
5.6.90.0150.02718.37
5.6.80.0140.02418.06
5.6.70.0150.03518.06
5.6.60.0100.02818.03
5.6.50.0280.02318.08
5.6.40.0100.02718.09
5.6.30.0090.03018.07
5.6.20.0100.02518.12
5.6.10.0100.02918.08
5.6.00.0130.02318.03
5.5.380.0210.01716.63
5.5.370.0130.02216.73
5.5.360.0090.02616.55
5.5.350.0150.02816.60
5.5.340.0150.02916.92
5.5.330.0110.05316.89
5.5.320.0140.03816.79
5.5.310.0070.03017.03
5.5.300.0100.04716.99
5.5.290.0110.02716.96
5.5.280.0130.02616.95
5.5.270.0110.02617.01
5.5.260.0140.02317.05
5.5.250.0120.02416.78
5.5.240.0130.02716.31
5.5.230.0140.02416.62
5.5.220.0070.03216.46
5.5.210.0100.03216.64
5.5.200.0090.02816.52
5.5.190.0140.02516.57
5.5.180.0140.02616.60
5.5.170.0260.00715.80
5.5.160.0070.05116.59
5.5.150.0060.02916.60
5.5.140.0140.02316.62
5.5.130.0120.04516.46
5.5.120.0110.03116.59
5.5.110.0120.03316.48
5.5.100.0090.02816.54
5.5.90.0110.02616.60
5.5.80.0130.02116.42
5.5.70.0130.02316.46
5.5.60.0100.02616.48
5.5.50.0120.02816.48
5.5.40.0190.02516.46
5.5.30.0120.02716.43
5.5.20.0120.02416.40
5.5.10.0050.04816.54
5.5.00.0100.02616.54

preferences:
64.6 ms | 401 KiB | 5 Q