3v4l.org

run code in 300+ PHP versions simultaneously
<?php $original = []; foreach (range(1, 20_000) as $iteration) { $original[] = [ 'id' => str_repeat("{$iteration}.", 4), 'name' => 'name', ]; } var_dump( array_reduce( $original, static function (array $result, array $item): array { if (str_starts_with($item['id'], '11')) { $result[] = $item; } return $result; }, [] ) );

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.0430.01526.12
8.3.60.0260.02626.36
8.3.50.0230.03325.64
8.3.40.0400.02729.21
8.3.30.0300.03027.69
8.3.20.0140.01430.87
8.3.10.0390.01130.59
8.3.00.0220.00631.20
8.2.190.0490.00825.63
8.2.180.0250.02926.65
8.2.170.0340.03428.09
8.2.160.0190.02929.64
8.2.150.0250.01429.55
8.2.140.0190.00627.77
8.2.130.0200.00327.03
8.2.120.0100.01428.30
8.2.110.0210.01429.92
8.2.100.0230.01626.84
8.2.90.0140.01028.46
8.2.80.0060.01628.21
8.2.70.0150.01126.75
8.2.60.0190.01127.05
8.2.50.0070.01526.75
8.2.40.0100.01027.28
8.2.30.0120.01227.32
8.2.20.0090.01828.00
8.2.10.0220.01228.01
8.2.00.0220.01327.98
8.1.280.0330.03325.92
8.1.270.0210.02130.85
8.1.260.0180.00932.93
8.1.250.0140.00732.07
8.1.240.0110.02132.39
8.1.230.0250.01132.39
8.1.220.0070.01727.39
8.1.210.0220.01128.52
8.1.200.0220.00627.10
8.1.190.0130.01326.85
8.1.180.0170.00726.98
8.1.170.0140.01128.16
8.1.160.0120.00928.56
8.1.150.0100.02028.24
8.1.140.0270.00928.34
8.1.130.0210.01428.36
8.1.120.0190.01928.43
8.1.110.0140.01928.42
8.1.100.0170.02028.43
8.1.90.0160.01628.34
8.1.80.0190.01528.30
8.1.70.0170.01728.48
8.1.60.0260.01028.56
8.1.50.0220.01128.48
8.1.40.0250.01428.51
8.1.30.0180.01528.57
8.1.20.0240.01228.55
8.1.10.0190.01328.51
8.1.00.0130.02228.34
8.0.300.0070.01829.41
8.0.290.0090.01226.13
8.0.280.0070.01327.79
8.0.270.0240.01027.36
8.0.260.0150.01527.45
8.0.250.0060.02427.43
8.0.240.0200.00827.52
8.0.230.0180.01127.54
8.0.220.0200.01227.46
8.0.210.0160.01627.50
8.0.200.0160.01627.48
8.0.190.0190.01327.44
8.0.180.0140.01727.48
8.0.170.0180.01227.46
8.0.160.0170.01027.57
8.0.150.0190.01127.40
8.0.140.0060.02427.48
8.0.130.0200.01627.47
8.0.120.0200.01527.54
8.0.110.0230.01227.37
8.0.100.0270.01227.35
8.0.90.0170.01727.38
8.0.80.0220.01027.48
8.0.70.0260.00727.48
8.0.60.0370.00027.47
8.0.50.0160.01627.40
8.0.30.0160.01627.44
8.0.20.0210.01527.44
8.0.10.0180.01427.60

preferences:
27.23 ms | 402 KiB | 5 Q