3v4l.org

run code in 300+ PHP versions simultaneously
<?php class StringValue implements JsonSerializable { public function __construct($string) { $this->string = (string) $string; } public function jsonSerialize() { return $this->string; } } echo json_encode(new StringValue('Hello!'), 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.60.0120.00318.68
8.3.50.0130.00922.03
8.3.40.0140.00718.98
8.3.30.0120.00318.70
8.3.20.0070.00021.89
8.3.10.0060.00618.60
8.3.00.0040.00422.04
8.2.180.0110.00718.43
8.2.170.0140.00022.96
8.2.160.0040.01122.02
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0040.00419.52
8.2.120.0040.00426.35
8.2.110.0060.00319.37
8.2.100.0060.00617.84
8.2.90.0040.00419.27
8.2.80.0040.00417.97
8.2.70.0000.00817.38
8.2.60.0000.00817.91
8.2.50.0000.00818.10
8.2.40.0040.00420.43
8.2.30.0070.00019.12
8.2.20.0050.00218.11
8.2.10.0040.00417.94
8.2.00.0000.00717.55
8.1.280.0130.00325.92
8.1.270.0030.00523.79
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0060.00324.05
8.1.230.0070.00417.82
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0000.00917.35
8.1.190.0040.00417.13
8.1.180.0030.00618.10
8.1.170.0090.00018.60
8.1.160.0000.00818.77
8.1.150.0000.00722.04
8.1.140.0000.00819.48
8.1.130.0050.00218.88
8.1.120.0020.00517.35
8.1.110.0000.00717.45
8.1.100.0000.00717.47
8.1.90.0030.00617.48
8.1.80.0040.00417.36
8.1.70.0030.00317.42
8.1.60.0040.00417.57
8.1.50.0060.00317.39
8.1.40.0000.00717.53
8.1.30.0000.00717.55
8.1.20.0050.00317.61
8.1.10.0110.00017.56
8.1.00.0070.00017.52
8.0.300.0040.00418.77
8.0.290.0050.00316.75
8.0.280.0000.00718.39
8.0.270.0050.00317.31
8.0.260.0000.00617.25
8.0.250.0000.00716.79
8.0.240.0000.01016.97
8.0.230.0030.00616.83
8.0.220.0000.00716.75
8.0.210.0030.00316.81
8.0.200.0030.00316.77
8.0.190.0000.00716.89
8.0.180.0000.00816.74
8.0.170.0070.00016.84
8.0.160.0000.00716.75
8.0.150.0070.00016.86
8.0.140.0000.00816.68
8.0.130.0000.00513.25
8.0.120.0040.00416.73
8.0.110.0030.00516.95
8.0.100.0030.00316.75
8.0.90.0000.00716.78
8.0.80.0050.01016.88
8.0.70.0040.00416.83
8.0.60.0040.00416.93
8.0.50.0030.00416.77
8.0.30.0080.01017.07
8.0.20.0100.01117.40
8.0.10.0050.00216.80
8.0.00.0110.00716.84
7.4.330.0030.00315.55
7.4.320.0070.00016.39
7.4.300.0060.00016.55
7.4.290.0030.00316.49
7.4.280.0030.00616.57
7.4.270.0030.00316.51
7.4.260.0030.00316.48
7.4.250.0000.00716.39
7.4.240.0040.00416.37
7.4.230.0070.00016.32
7.4.220.0180.00716.62
7.4.210.0100.01016.54
7.4.200.0030.00316.24
7.4.160.0040.01116.43
7.4.150.0130.01017.40
7.4.140.0090.00817.86
7.4.130.0110.00716.54
7.4.120.0090.01216.50
7.4.110.0140.01116.39
7.4.100.0140.00416.40
7.4.90.0140.00916.53
7.4.80.0030.01719.39
7.4.70.0100.00616.56
7.4.60.0130.00616.50
7.4.50.0040.01216.52
7.4.40.0050.01516.36
7.4.30.0100.01016.48
7.4.00.0080.00615.05
7.3.330.0000.00513.07
7.3.320.0000.00613.08
7.3.310.0000.00716.34
7.3.300.0030.00316.17
7.3.290.0120.00616.31
7.3.280.0090.00716.28
7.3.270.0070.01117.40
7.3.260.0060.01116.39
7.3.250.0080.01116.42
7.3.240.0130.01216.33
7.3.230.0160.00016.26
7.3.210.0140.00416.48
7.3.200.0140.00616.48
7.3.190.0130.00916.43
7.3.180.0140.00316.31
7.3.170.0090.00916.55
7.3.160.0090.01116.55
7.2.330.0150.00616.64
7.2.320.0100.01016.70
7.2.310.0070.01016.70
7.2.300.0060.01416.45
7.2.290.0030.01416.54
7.1.70.0000.00817.01
7.1.60.0030.01017.12
7.1.10.0270.05022.29
7.1.00.0070.06322.29
7.0.200.0000.00716.78
7.0.150.0100.06021.81
7.0.140.0070.05721.88
7.0.130.0170.07021.80
7.0.120.0130.05021.96
7.0.110.0130.05721.83
7.0.100.0130.06321.76
7.0.90.0100.05721.88
7.0.80.0070.05721.87
7.0.70.0070.05721.78
7.0.60.0100.05321.77
7.0.50.0100.05321.90
7.0.40.0070.05721.77
7.0.30.0070.05721.88
7.0.20.0100.06021.82
7.0.10.0130.05021.82
7.0.00.0070.06021.87

preferences:
31.6 ms | 401 KiB | 5 Q