3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ArrayValue implements JsonSerializable { public function __construct(array $array) { $this->array = $array; } public function jsonSerialize() { return $this->array; } } $array = ['foo' => 'bar', 'quux' => 'baz']; echo json_encode(new ArrayValue($array), JSON_PRETTY_PRINT);

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.120.0060.00318.68
8.3.110.0080.00018.43
8.3.100.0090.00018.47
8.3.90.0040.01116.83
8.3.80.0090.00018.48
8.3.70.0140.00718.56
8.3.60.0140.00718.43
8.3.50.0090.00518.27
8.3.40.0070.00718.83
8.3.30.0090.00618.83
8.3.20.0050.01223.71
8.3.10.0080.00524.65
8.3.00.0090.00523.78
8.2.230.0100.01020.94
8.2.220.0080.00024.06
8.2.210.0040.00426.77
8.2.200.0030.00618.54
8.2.190.0090.01216.63
8.2.180.0040.01116.75
8.2.170.0130.00622.96
8.2.160.0130.00622.10
8.2.150.0140.00725.29
8.2.140.0100.00425.16
8.2.130.0050.00825.91
8.2.120.0090.00523.35
8.2.110.0090.00523.07
8.2.100.0120.00421.75
8.2.90.0070.00621.75
8.2.80.0110.00221.82
8.2.70.0060.00521.58
8.2.60.0050.00821.80
8.2.50.0040.00421.88
8.2.40.0040.00423.01
8.2.30.0050.00422.39
8.2.20.0080.00521.89
8.2.10.0090.00421.92
8.2.00.0080.00121.86
8.1.290.0030.00618.88
8.1.280.0110.00325.92
8.1.270.0050.00324.68
8.1.260.0030.00626.01
8.1.250.0040.00426.88
8.1.240.0040.00423.94
8.1.230.0110.00221.54
8.1.220.0020.00821.73
8.1.210.0060.00322.22
8.1.200.0030.00621.51
8.1.190.0050.00321.51
8.1.180.0040.00421.88
8.1.170.0010.00722.09
8.1.160.0010.00722.25
8.1.150.0040.00422.30
8.1.140.0070.00222.37
8.1.130.0020.00521.75
8.1.120.0030.00421.58
8.1.110.0030.00521.53
8.1.100.0050.00421.51
8.1.90.0040.00321.56
8.1.80.0060.00421.58
8.1.70.0010.00721.48
8.1.60.0040.00421.58
8.1.50.0030.00618.80
8.1.40.0040.00521.60
8.1.30.0060.00621.66
8.1.20.0090.00318.61
8.1.10.0040.00521.62
8.1.00.0020.00621.52
8.0.300.0020.00722.87
8.0.290.0100.00421.14
8.0.280.0080.00321.99
8.0.270.0030.00521.24
8.0.260.0070.00321.43
8.0.250.0030.00421.32
8.0.240.0050.00521.28
8.0.230.0080.00221.30
8.0.220.0060.00221.29
8.0.210.0070.00421.29
8.0.200.0040.00321.24
8.0.190.0090.00221.28
8.0.180.0040.00421.27
8.0.170.0120.00721.33
8.0.160.0060.00521.26
8.0.150.0070.00318.29
8.0.140.0120.00921.24
8.0.130.0080.00819.50
8.0.120.0180.00421.26
8.0.110.0080.00421.30
8.0.100.0100.00921.22
8.0.90.0130.00321.25
8.0.80.0090.00621.29
8.0.70.0030.00821.29
8.0.60.0130.00321.31
8.0.50.0080.00521.19
8.0.30.0110.00718.01
8.0.20.0120.00918.52
8.0.10.0080.00721.32
8.0.00.0100.00718.67
7.4.330.0090.00520.61
7.4.320.0160.00421.14
7.4.300.0140.00321.08
7.4.290.0120.00521.05
7.4.280.0100.00321.10
7.4.270.0070.00518.75
7.4.260.0140.00721.08
7.4.250.0150.00721.07
7.4.240.0140.00521.10
7.4.230.0140.00821.14
7.4.220.0140.00521.17
7.4.210.0130.00919.66
7.4.200.0090.00521.08
7.4.190.0160.00825.66
7.4.180.0260.00425.66
7.4.160.0120.00918.44
7.4.150.0120.00719.87
7.4.140.0110.00918.92
7.4.130.0120.01318.69
7.4.120.0100.01017.61
7.4.110.0100.00918.84
7.4.100.0160.00618.79
7.4.90.0130.00818.75
7.4.80.0110.00819.47
7.4.70.0120.00918.33
7.4.60.0090.00818.32
7.4.50.0110.00518.29
7.4.40.0090.00918.71
7.4.30.0080.00918.80
7.4.20.0120.00418.66
7.4.10.0110.01018.79
7.4.00.0090.00917.97
7.3.330.0110.00217.78
7.3.320.0110.00019.49
7.3.310.0080.00421.00
7.3.300.0110.00220.97
7.3.290.0070.00720.96
7.3.280.0110.00718.55
7.3.270.0100.00919.76
7.3.260.0100.00718.20
7.3.250.0130.00717.84
7.3.240.0090.01117.84
7.3.230.0100.01118.57
7.3.220.0080.01219.41
7.3.210.0110.00818.61
7.3.200.0080.00818.65
7.3.190.0060.01018.21
7.3.180.0090.00718.14
7.3.170.0100.00818.56
7.3.160.0090.00718.66
7.3.150.0100.01018.69
7.3.140.0080.00718.59
7.3.130.0150.00718.66
7.3.120.0150.00518.58
7.3.110.0110.01018.63
7.3.100.0130.00818.59
7.3.90.0140.00618.70
7.3.80.0150.00818.58
7.3.70.0160.00418.57
7.3.60.0130.00618.60
7.3.50.0110.00818.65
7.3.40.0140.00618.64
7.3.30.0100.00718.61
7.3.20.0210.00518.64
7.3.10.0140.00518.64
7.3.00.0170.00718.57
7.2.340.0160.00819.45
7.2.330.0110.00918.84
7.2.320.0130.00818.79
7.2.310.0090.01218.77
7.2.300.0110.00918.82
7.2.290.0120.00718.78
7.2.280.0160.00618.77
7.2.270.0180.00318.76
7.2.260.0160.00618.80
7.2.250.0140.00718.83
7.2.240.0190.00618.86
7.2.230.0170.01018.70
7.2.220.0140.00918.78
7.2.210.0150.01018.66
7.2.200.0160.00818.85
7.2.190.0150.00818.80
7.2.180.0160.00718.82
7.2.170.0160.00918.79
7.2.160.0150.01018.82
7.2.150.0180.00718.88
7.2.140.0170.00518.86
7.2.130.0120.01218.86
7.2.120.0190.00718.95
7.2.110.0160.00918.79
7.2.100.0150.00818.88
7.2.90.0130.00718.86
7.2.80.0120.00818.82
7.2.70.0110.00918.82
7.2.60.0150.00418.50
7.2.50.0120.01018.84
7.2.40.0100.01018.85
7.2.30.0150.00818.93
7.2.20.0120.00718.86
7.2.10.0150.00618.88
7.2.00.0100.01019.04
7.1.330.0160.00718.10
7.1.320.0270.00518.05
7.1.310.0200.00518.03
7.1.300.0170.00918.04
7.1.290.0210.00917.98
7.1.280.0220.00817.99
7.1.270.0220.00418.03
7.1.260.0200.00717.93
7.1.250.0230.00618.01
7.1.240.0230.01017.90
7.1.230.0220.00718.00
7.1.220.0230.00617.99
7.1.210.0230.00617.95
7.1.200.0170.01017.55
7.1.190.0250.00318.02
7.1.180.0200.00617.97
7.1.170.0220.00417.98
7.1.160.0240.00818.05
7.1.150.0180.00617.93
7.1.140.0160.00718.00
7.1.130.0160.00817.97
7.1.120.0130.00918.02
7.1.110.0180.00817.93
7.1.100.0170.00817.87
7.1.90.0170.00618.05
7.1.80.0170.01117.90
7.1.70.0160.00817.77
7.1.60.0190.01021.40
7.1.50.0190.01121.29
7.1.40.0180.01021.25
7.1.30.0200.00921.26
7.1.20.0220.01021.26
7.1.10.0180.00717.68
7.1.00.0180.00717.69
7.0.330.0200.00617.83
7.0.320.0190.00817.78
7.0.310.0170.01017.87
7.0.300.0190.00617.80
7.0.290.0170.00917.87
7.0.280.0210.00517.88
7.0.270.0190.00717.84
7.0.260.0200.00717.86
7.0.250.0180.00817.94
7.0.240.0180.00617.87
7.0.230.0250.00417.84
7.0.220.0230.00817.90
7.0.210.0190.00817.84
7.0.200.0200.00817.83
7.0.190.0160.00917.81
7.0.180.0190.00817.80
7.0.170.0190.00717.83
7.0.160.0190.00917.85
7.0.150.0190.00617.85
7.0.140.0240.00717.86
7.0.130.0190.00717.84
7.0.120.0200.00917.78
7.0.110.0160.00817.86
7.0.100.0160.00717.86
7.0.90.0310.00517.82
7.0.80.0130.00917.83
7.0.70.0200.00417.80
7.0.60.0150.00817.81
7.0.50.0150.00717.79
7.0.40.0150.00617.73
7.0.30.0130.00917.82
7.0.20.0180.00617.84
7.0.10.0200.00417.76
7.0.00.0150.00817.78
5.6.400.0220.01118.39
5.6.390.0160.01518.42
5.6.380.0170.01718.34
5.6.370.0170.01418.39
5.6.360.0180.01218.31
5.6.350.0120.01818.35
5.6.340.0150.01518.36
5.6.330.0190.01618.40
5.6.320.0210.01218.22
5.6.310.0170.02218.41
5.6.300.0170.01918.33
5.6.290.0170.02118.43
5.6.280.0200.01618.39
5.6.270.0150.01918.43
5.6.260.0190.01818.30
5.6.250.0180.01518.31
5.6.240.0210.01818.30
5.6.230.0160.01518.36
5.6.220.0200.01418.38
5.6.210.0150.01618.29
5.6.200.0190.01318.37
5.6.190.0180.01318.32
5.6.180.0200.01418.29
5.6.170.0170.02018.41
5.6.160.0180.01718.42
5.6.150.0210.01418.42
5.6.140.0170.01518.43
5.6.130.0180.02618.36
5.6.120.0200.01518.35
5.6.110.0200.01718.33
5.6.100.0160.01618.40
5.6.90.0180.01418.37
5.6.80.0190.01618.24
5.6.70.0170.01318.33
5.6.60.0190.01418.35
5.6.50.0160.01618.28
5.6.40.0170.01418.38
5.6.30.0180.01418.36
5.6.20.0170.01418.35
5.6.10.0150.01518.22
5.6.00.0160.01518.27

preferences:
35.24 ms | 403 KiB | 5 Q