3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @param array{id: string, name: string} $user * @return array{id: string, name: string} */ function takesUserData(array $user): array { $user['extra_data'] = new stdClass(); return $user; } $foo = ['id' => 'DP42', 'name' => 'Douglas Adams']; echo implode('', takesUserData($foo));

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.4.10.0030.00623.86
8.3.140.0070.00716.86
8.3.130.0040.00418.41
8.3.120.0060.01319.07
8.3.110.0090.00020.94
8.3.100.0090.00024.06
8.3.90.0070.00726.77
8.3.80.0030.00716.38
8.3.70.0070.01416.75
8.3.60.0090.00916.75
8.3.50.0090.00620.16
8.3.40.0100.00320.04
8.3.30.0110.00418.79
8.3.20.0050.00324.18
8.3.10.0080.00024.66
8.3.00.0000.00826.16
8.2.260.0180.00016.93
8.2.250.0100.00718.54
8.2.240.0120.00318.88
8.2.230.0080.00022.58
8.2.220.0060.00337.54
8.2.210.0070.01026.77
8.2.200.0060.00318.41
8.2.190.0040.01118.43
8.2.180.0120.00325.92
8.2.170.0040.01118.99
8.2.160.0100.00322.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00720.75
8.2.110.0030.00720.92
8.2.100.0080.00417.84
8.2.90.0050.00318.03
8.2.80.0060.00319.95
8.2.70.0060.00317.50
8.2.60.0040.00717.75
8.2.50.0040.00417.63
8.2.40.0030.00619.95
8.2.30.0070.00018.07
8.2.20.0050.00220.63
8.2.10.0050.00218.12
8.2.00.0000.01019.32
8.1.310.0060.01216.76
8.1.300.0090.00016.40
8.1.290.0040.00730.84
8.1.280.0130.00725.92
8.1.270.0000.00724.66
8.1.260.0070.00726.35
8.1.250.0080.00028.09
8.1.240.0060.00322.59
8.1.230.0120.00020.74
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0050.00317.35
8.1.190.0070.00417.23
8.1.180.0030.00518.10
8.1.170.0050.00418.35
8.1.160.0040.00418.88
8.1.150.0000.00718.53
8.1.140.0050.00217.39
8.1.130.0000.00717.30
8.1.120.0090.00617.21
8.1.110.0080.00417.51
8.1.100.0080.00317.42
8.1.90.0070.00517.32
8.1.80.0080.00416.98
8.1.70.0000.00917.34
8.1.60.0150.00317.62
8.1.50.0130.00017.42
8.1.40.0120.00817.26
8.1.30.0080.00517.51
8.1.20.0140.00017.69
8.1.10.0150.00217.39
8.1.00.0120.00617.22
8.0.300.0050.00219.91
8.0.290.0000.00716.75
8.0.280.0040.00418.39
8.0.270.0000.00716.84
8.0.260.0040.00416.74
8.0.250.0000.00916.83
8.0.240.0140.00316.76
8.0.230.0040.00816.80
8.0.220.0110.00416.68
8.0.210.0050.00716.68
8.0.200.0030.00916.79
8.0.190.0050.00716.55
8.0.180.0070.00716.80
8.0.170.0110.00516.21
8.0.160.0090.00216.48
8.0.150.0060.01216.54
8.0.140.0060.00616.64
8.0.130.0140.00316.71
8.0.120.0090.00616.57
8.0.110.0060.00616.55
8.0.100.0070.00716.58
8.0.90.0090.00316.47
8.0.80.0090.00416.68
8.0.70.0040.00616.76
8.0.60.0070.00716.58
8.0.50.0140.00016.49
8.0.30.0090.00516.67
8.0.20.0080.00616.54
8.0.10.0060.00616.91
7.4.330.0100.00314.29
7.4.320.0090.00416.26
7.4.300.0080.00416.38
7.4.290.0080.00316.32
7.4.280.0130.00016.27
7.4.270.0040.00816.12
7.4.260.0050.00816.16
7.4.250.0090.00316.17
7.4.240.0100.00316.26
7.4.230.0070.00716.24
7.4.220.0120.00216.16
7.4.210.0080.00416.14
7.4.200.0070.00416.35
7.4.190.0120.00016.32
7.4.180.0120.00416.41
7.4.160.0000.01316.18
7.4.150.0110.00016.15
7.4.140.0090.00215.98
7.4.130.0080.00416.20
7.4.120.0070.00516.50
7.4.110.0080.00516.27
7.4.100.0090.00516.11
7.4.90.0130.00016.05
7.4.80.0080.00416.12
7.4.70.0110.00016.06
7.4.60.0130.00016.10
7.4.50.0140.00015.91
7.4.40.0000.01216.07
7.4.30.0120.00016.11
7.4.20.0040.00915.73
7.4.10.0100.00416.01
7.4.00.0090.00316.21

preferences:
100.12 ms | 403 KiB | 5 Q