3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test implements JsonSerializable { public $a = 2; public function JsonSerialize() { return array('b' => 2, 'test'=>$this); } } var_dump(json_encode(new test(), JSON_PARTIAL_OUTPUT_ON_ERROR)); var_dump(json_last_error_msg());

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.0030.01018.36
8.3.50.0120.00422.79
8.3.40.0070.00718.87
8.3.30.0000.01419.04
8.3.20.0000.00820.34
8.3.10.0050.00323.48
8.3.00.0050.00317.50
8.2.180.0040.01116.75
8.2.170.0110.00622.96
8.2.160.0130.00020.52
8.2.150.0000.00824.18
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0140.00020.90
8.2.110.0050.00521.04
8.2.100.0060.00617.72
8.2.90.0050.00319.22
8.2.80.0040.00417.97
8.2.70.0090.00017.50
8.2.60.0080.00017.80
8.2.50.0040.00418.07
8.2.40.0040.00418.03
8.2.30.0070.00018.06
8.2.20.0070.00017.68
8.2.10.0000.00718.18
8.2.00.0000.00817.65
8.1.280.0180.00325.92
8.1.270.0060.00323.95
8.1.260.0050.00226.35
8.1.250.0070.00728.09
8.1.240.0090.00023.91
8.1.230.0040.00820.90
8.1.220.0050.00317.74
8.1.210.0090.00018.77
8.1.200.0040.00717.23
8.1.190.0060.00317.35
8.1.180.0080.00018.10
8.1.170.0080.00218.50
8.1.160.0040.00422.07
8.1.150.0030.00618.89
8.1.140.0130.00017.50
8.1.130.0030.00317.82
8.1.120.0030.00317.49
8.1.110.0000.00717.46
8.1.100.0000.00817.44
8.1.90.0040.00417.46
8.1.80.0020.00517.36
8.1.70.0000.00717.34
8.1.60.0040.00417.41
8.1.50.0040.00417.34
8.1.40.0060.00317.46
8.1.30.0030.00517.56
8.1.20.0000.00817.59
8.1.10.0000.00717.44
8.1.00.0040.00717.36
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0080.00018.35
8.0.270.0000.00717.24
8.0.260.0030.00317.10
8.0.250.0030.00316.91
8.0.240.0060.00016.94
8.0.230.0000.00816.74
8.0.220.0050.00316.82
8.0.210.0000.00716.82
8.0.200.0000.00616.78
8.0.190.0000.00716.89
8.0.180.0030.00416.79
8.0.170.0040.00416.70
8.0.160.0030.00316.84
8.0.150.0080.00016.67
8.0.140.0000.00716.65
8.0.130.0050.00013.23
8.0.120.0000.00816.75
8.0.110.0000.00716.87
8.0.100.0070.00016.63
8.0.90.0000.00716.64
8.0.80.0110.01016.79
8.0.70.0050.00216.89
8.0.60.0000.00716.88
8.0.50.0040.00416.78
8.0.30.0100.00917.03
8.0.20.0090.01017.40
8.0.10.0000.00816.81
8.0.00.0140.00616.72
7.4.330.0050.00215.00
7.4.320.0060.00016.51
7.4.300.0050.00516.54
7.4.290.0030.00316.42
7.4.280.0000.00716.55
7.4.270.0030.00316.52
7.4.260.0000.00816.44
7.4.250.0050.00516.30
7.4.240.0000.00716.48
7.4.230.0000.00716.56
7.4.220.0090.00916.58
7.4.210.0070.00716.62
7.4.200.0050.00316.32
7.4.160.0140.00616.39
7.4.150.0040.01417.40
7.4.140.0130.00617.86
7.4.130.0120.00516.50
7.4.120.0100.00716.51
7.4.110.0030.01316.53
7.4.100.0060.01216.54
7.4.90.0090.01016.59
7.4.80.0060.01219.39
7.4.70.0070.01016.46
7.4.60.0110.00616.40
7.4.50.0080.00016.36
7.4.40.0110.00516.34
7.4.30.0060.01016.54
7.4.00.0030.00714.75
7.3.330.0030.00313.26
7.3.320.0000.00513.22
7.3.310.0030.00316.19
7.3.300.0060.00016.27
7.3.290.0030.01116.31
7.3.280.0040.01216.30
7.3.270.0140.00317.40
7.3.260.0100.01316.20
7.3.250.0140.00316.35
7.3.240.0070.01116.52
7.3.230.0080.00816.55
7.3.210.0120.00916.60
7.3.200.0120.00619.39
7.3.190.0180.00316.15
7.3.180.0100.00616.39
7.3.170.0070.01016.38
7.3.160.0120.00316.34
7.2.330.0090.00916.60
7.2.320.0180.00316.53
7.2.310.0000.01616.34
7.2.300.0170.00016.43
7.2.290.0040.01216.42
7.2.60.0030.00816.69
7.2.00.0070.00419.34
7.1.200.0030.00615.74
7.1.100.0000.00918.08
7.1.70.0460.00715.38
7.1.60.0600.01715.34
7.1.50.0460.00415.14
7.1.40.0570.01015.14
7.1.30.0500.00715.14
7.1.20.0670.01215.14
7.1.10.0460.00415.14
7.1.00.0460.01115.14
7.0.200.0610.00615.14
7.0.190.0520.00615.14
7.0.180.0400.00415.14
7.0.170.0440.00715.14
7.0.160.0520.00315.14
7.0.150.0470.00915.14
7.0.140.0470.00315.14
7.0.130.0540.00715.14
7.0.120.0620.00015.14
7.0.110.0470.00615.14
7.0.100.0520.00615.14
7.0.90.3840.01015.14
7.0.80.0390.01015.14
7.0.70.0500.00315.14
7.0.60.0450.00915.14
7.0.50.0490.00915.14
7.0.40.0000.01315.14
7.0.30.0090.00415.14
7.0.20.0040.01315.14
7.0.10.0040.00915.14
7.0.00.0050.01015.14
5.6.300.0150.04420.80
5.6.290.0200.04120.68
5.6.280.0130.06920.97
5.6.270.0140.04120.79
5.6.260.0070.04321.03
5.6.250.0030.05220.88
5.6.240.0060.04920.84
5.6.230.0210.03620.83
5.6.220.0130.04321.00
5.6.210.0150.03621.04
5.6.200.0070.06520.98
5.6.190.0030.05220.83
5.6.180.0100.04220.82
5.6.170.0100.04020.82
5.6.160.0070.05520.88
5.6.150.0100.04120.71
5.6.140.0090.04821.00
5.6.130.0190.03120.81
5.6.120.0140.03920.91
5.6.110.0130.03720.98
5.6.100.0030.04720.72
5.6.90.0100.04320.98
5.6.80.0110.06520.30
5.6.70.0030.04820.31
5.6.60.0090.04220.14
5.6.50.0070.05720.29
5.6.40.0100.04220.37
5.6.30.0100.04820.18
5.6.20.0100.04120.26
5.6.10.0130.05820.34
5.6.00.0070.04320.29
5.5.380.0130.03817.54
5.5.370.0120.04317.67
5.5.360.0030.04517.66
5.5.350.0110.04017.45
5.5.340.0100.04318.01
5.5.330.0030.04517.84
5.5.320.0150.03318.08
5.5.310.0200.05717.84
5.5.300.0070.05017.83
5.5.290.0030.04917.70
5.5.280.0100.03817.70
5.5.270.0100.03918.10
5.5.260.0040.05018.00
5.5.250.0140.03817.55
5.5.240.0190.03217.39
5.5.230.0100.03417.51
5.5.220.0030.05117.48
5.5.210.0000.04717.43
5.5.200.0060.03817.47
5.5.190.0100.04617.08
5.5.180.0120.04017.38
5.5.160.0030.06017.35
5.5.150.0030.04217.38
5.5.140.0070.03617.38
5.5.130.0100.05917.46
5.5.120.0060.05117.34
5.5.110.0160.07117.35
5.5.100.0130.04717.31
5.5.90.0070.03717.29
5.5.80.0000.06217.32
5.5.70.0060.03817.25
5.5.60.0070.04217.37
5.5.50.0070.04317.24
5.5.40.0200.02617.33
5.5.30.0070.03917.27
5.5.20.0130.03617.34
5.5.10.0030.04117.31
5.5.00.0130.03017.27
5.4.450.0160.03219.41
5.4.440.0070.04019.31
5.4.430.0000.04419.24
5.4.420.0070.04119.39
5.4.410.0120.03419.24
5.4.400.0070.03819.11
5.4.390.0000.04919.08
5.4.380.0130.02919.00
5.4.370.0100.04119.08
5.4.360.0090.03519.18
5.4.350.0110.07118.92
5.4.340.0100.03519.09
5.4.320.0070.04318.98
5.4.310.0130.03218.94
5.4.300.0000.04318.98
5.4.290.0100.04418.89
5.4.280.0070.04719.17
5.4.270.0030.04118.95
5.4.260.0130.03519.07
5.4.250.0130.04319.05
5.4.240.0060.04119.20
5.4.230.0100.03619.18
5.4.220.0120.03318.98
5.4.210.0060.04419.05
5.4.200.0030.03919.10
5.4.190.0030.04119.10
5.4.180.0030.04018.92
5.4.170.0030.04518.91
5.4.160.0070.03718.95
5.4.150.0100.03619.19
5.4.140.0190.02516.59
5.4.130.0000.03916.42
5.4.120.0030.04216.66
5.4.110.0030.04316.63
5.4.100.0030.03716.64
5.4.90.0040.03916.63
5.4.80.0150.02716.67
5.4.70.0030.03716.44
5.4.60.0000.05016.47
5.4.50.0000.03916.69
5.4.40.0100.03316.74
5.4.30.0100.03316.65
5.4.20.0030.05016.59
5.4.10.0030.05216.45
5.4.00.0030.04216.15
5.3.290.0130.03515.14
5.3.280.0070.03615.14
5.3.270.0030.04715.14
5.3.260.0090.03415.14
5.3.250.0060.03915.14
5.3.240.0070.03915.14
5.3.230.0100.03415.14
5.3.220.0030.04015.14
5.3.210.0070.04115.14
5.3.200.0000.04115.14
5.3.190.0030.04115.14
5.3.180.0140.03015.14
5.3.170.0040.04315.14
5.3.160.0000.04415.14
5.3.150.0070.03715.14
5.3.140.0040.04015.14
5.3.130.0030.03815.14
5.3.120.0030.04315.14
5.3.110.0090.03815.14
5.3.100.0100.03215.14
5.3.90.0070.04115.14
5.3.80.0120.03115.14
5.3.70.0030.04715.14
5.3.60.0000.04215.14
5.3.50.0060.03715.14
5.3.40.0040.03615.14
5.3.30.0030.04015.14
5.3.20.0030.04315.14
5.3.10.0070.03315.14
5.3.00.0190.03415.14
5.2.170.0070.03415.14
5.2.160.0060.02615.14
5.2.150.0160.01915.14
5.2.140.0030.03415.14
5.2.130.0030.03115.14
5.2.120.0030.03015.14
5.2.110.0100.02315.14
5.2.100.0000.03215.14
5.2.90.0070.02415.14
5.2.80.0040.03715.14
5.2.70.0060.02815.14
5.2.60.0100.02615.14
5.2.50.0000.04115.14
5.2.40.0030.02915.14
5.2.30.0000.03515.14
5.2.20.0000.03515.14
5.2.10.0040.02915.14
5.2.00.0000.03715.14
5.1.60.0000.02915.14
5.1.50.0000.02615.14
5.1.40.0060.02115.14
5.1.30.0030.02815.14
5.1.20.0030.02815.14
5.1.10.0000.02715.14
5.1.00.0000.02715.14
5.0.50.0060.01915.14
5.0.40.0030.01715.14
5.0.30.0000.04015.14
5.0.20.0000.02615.14
5.0.10.0030.02015.14
5.0.00.0060.02715.14
4.4.90.0040.01415.14
4.4.80.0000.02215.14
4.4.70.0090.01215.14
4.4.60.0040.01415.14
4.4.50.0030.01715.14
4.4.40.0040.03215.14
4.4.30.0030.01415.14
4.4.20.0000.01715.14
4.4.10.0070.02015.14
4.4.00.0030.02315.14
4.3.110.0000.01915.14
4.3.100.0000.01615.14
4.3.90.0030.01415.14
4.3.80.0000.03015.14
4.3.70.0030.01415.14
4.3.60.0030.01315.14
4.3.50.0030.01315.14
4.3.40.0030.04815.14
4.3.30.0040.01915.14
4.3.20.0030.01915.14
4.3.10.0090.00915.14
4.3.00.0000.01815.14

preferences:
39.1 ms | 401 KiB | 5 Q