3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo implements JsonSerializable { private $een; private $twee; public function __construct(string $een, int $twee = null) { $this->een = $een; $this->twee = $twee; } public function getEen(): string { return $this->een; } public function getTwee(): int { return $this->twee; } public function jsonSerialize(): array { return [$this->een, $this->twee]; } } $first = new Foo('thestring'); $storage = json_encode($first); var_dump($storage); $second = new Foo(...json_decode($storage, true)); var_dump($second);

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.70.0040.01416.50
8.3.60.0170.00318.25
8.3.50.0150.00116.57
8.3.40.0040.01118.68
8.3.30.0070.00718.85
8.3.20.0060.00320.35
8.3.10.0040.00421.09
8.3.00.0000.00817.80
8.2.190.0080.00816.75
8.2.180.0120.00316.63
8.2.170.0150.00022.96
8.2.160.0060.00819.41
8.2.150.0110.00424.18
8.2.140.0070.00024.66
8.2.130.0040.00420.32
8.2.120.0030.00526.35
8.2.110.0030.00622.21
8.2.100.0070.00717.66
8.2.90.0040.00419.26
8.2.80.0040.00417.97
8.2.70.0000.00817.75
8.2.60.0030.00517.77
8.2.50.0090.00618.10
8.2.40.0080.00020.55
8.2.30.0000.00719.27
8.2.20.0050.00217.98
8.2.10.0030.00618.12
8.2.00.0000.00718.07
8.1.280.0000.01425.92
8.1.270.0000.00823.99
8.1.260.0050.00326.35
8.1.250.0000.00728.09
8.1.240.0030.00623.97
8.1.230.0090.00317.70
8.1.220.0050.00317.79
8.1.210.0000.00818.77
8.1.200.0100.00017.47
8.1.190.0000.00817.13
8.1.180.0000.00818.10
8.1.170.0040.00418.69
8.1.160.0040.00418.94
8.1.150.0040.00418.88
8.1.140.0000.00719.54
8.1.130.0070.00018.86
8.1.120.0080.00017.47
8.1.110.0050.00317.47
8.1.100.0000.00717.50
8.1.90.0040.00417.36
8.1.80.0040.00417.45
8.1.70.0000.00817.40
8.1.60.0040.00417.59
8.1.50.0040.00417.42
8.1.40.0000.00817.47
8.1.30.0040.00417.70
8.1.20.0040.00417.54
8.1.10.0040.00417.62
8.1.00.0040.00417.55
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0040.00418.46
8.0.270.0040.00417.23
8.0.260.0070.00018.81
8.0.250.0000.00716.91
8.0.240.0030.00316.85
8.0.230.0050.00216.95
8.0.220.0030.00316.92
8.0.210.0030.00316.87
8.0.200.0040.00416.87
8.0.190.0040.00416.95
8.0.180.0070.00016.84
8.0.170.0040.00416.98
8.0.160.0040.00416.89
8.0.150.0080.00016.77
8.0.140.0000.00816.78
8.0.130.0040.00413.31
8.0.120.0000.00716.73
8.0.110.0030.00516.72
8.0.100.0060.00316.79
8.0.90.0000.00816.86
8.0.80.0120.00316.88
8.0.70.0040.00416.86
8.0.60.0000.00816.77
8.0.50.0050.00216.89
8.0.30.0070.01316.88
8.0.20.0080.01017.40
8.0.10.0050.00216.90
8.0.00.0080.00816.79
7.4.330.0020.00215.55
7.4.320.0030.00316.64
7.4.300.0030.00316.61
7.4.290.0030.00316.58
7.4.280.0050.00316.57
7.4.270.0000.00716.49
7.4.260.0000.00716.59
7.4.250.0070.00016.47
7.4.240.0000.00816.44
7.4.230.0030.00316.70
7.4.220.0110.00716.48
7.4.210.0070.00716.51
7.4.200.0030.00316.71
7.4.160.0100.00616.51
7.4.150.0130.00617.40
7.4.140.0070.01117.86
7.4.130.0090.00916.45
7.4.120.0080.01216.54
7.4.110.0070.01016.51
7.4.100.0150.00316.43
7.4.90.0060.01216.46
7.4.80.0060.01719.39
7.4.70.0080.00816.50
7.4.60.0030.01416.57
7.4.50.0000.01616.35
7.4.40.0030.01916.43
7.4.30.0090.01216.50
7.4.00.0000.01415.03
7.3.330.0030.00313.26
7.3.320.0050.00013.32
7.3.310.0070.00016.11
7.3.300.0040.00416.31
7.3.290.0080.00816.28
7.3.280.0100.00716.26
7.3.270.0070.01117.40
7.3.260.0100.00916.50
7.3.250.0150.00416.39
7.3.240.0100.00616.47
7.3.230.0100.00616.55
7.3.210.0080.00816.49
7.3.200.0110.00616.24
7.3.190.0100.01016.21
7.3.180.0150.00916.32
7.3.170.0060.01016.52
7.3.160.0100.00516.27
7.2.330.0120.00616.44
7.2.320.0110.01116.52
7.2.310.0060.01216.37
7.2.300.0150.00916.36
7.2.290.0080.00816.50
7.2.110.0110.00616.58
7.2.100.0110.00716.54
7.2.90.0130.00216.71
7.2.80.0120.00616.89
7.2.70.0110.00516.87
7.2.60.0120.00416.98
7.2.50.0130.00616.76
7.2.40.0050.01116.64
7.2.30.0040.01516.93
7.2.20.0110.00717.12
7.2.10.0070.01116.67
7.2.00.0150.00616.93
7.1.230.0080.00615.88
7.1.220.0080.00815.68
7.1.210.0100.00515.66
7.1.200.0100.00715.68
7.1.190.0120.00415.83
7.1.180.0330.00615.76
7.1.170.0070.00515.83
7.1.160.0110.00715.58
7.1.150.0100.00515.89
7.1.140.0090.00615.83
7.1.130.0110.01115.77
7.1.120.0110.00415.89
7.1.110.0490.00015.76
7.1.100.0170.00015.97
7.1.90.0150.00415.61
7.1.80.0200.00416.96
7.1.70.0090.00916.54
7.1.60.0170.01125.45
7.1.50.0190.01225.30
7.1.40.0190.00825.16
7.1.30.0170.01025.15
7.1.20.0180.00925.18
7.1.10.0090.00916.13
7.1.00.0060.01416.25
7.0.310.0680.00315.38
7.0.300.0110.00315.18
7.0.290.0150.00015.57
7.0.280.0240.00915.47
7.0.270.0380.00715.36
7.0.260.0090.00415.38
7.0.250.0120.00315.49
7.0.240.0060.00915.27
7.0.230.0130.00015.38
7.0.220.0170.00015.09
7.0.210.0070.00715.34
7.0.200.0090.00616.03
7.0.190.0130.00516.14
7.0.180.0070.00915.85
7.0.170.0040.01315.74
7.0.160.0110.00715.62
7.0.150.0070.00915.85
7.0.140.0070.00915.72
7.0.130.0080.00615.79
7.0.120.0080.00715.93
7.0.110.0110.00815.81
7.0.100.0070.00816.01
7.0.90.0090.00715.81
7.0.80.0030.01215.74
7.0.70.0090.00515.89
7.0.60.0090.00915.73
7.0.50.0050.01115.72
7.0.40.0070.00814.85
7.0.30.0090.00814.80
7.0.20.0070.00914.95
7.0.10.0070.00714.96
7.0.00.0100.00615.04
5.6.380.0130.00314.25

preferences:
18.03 ms | 401 KiB | 5 Q