3v4l.org

run code in 300+ PHP versions simultaneously
<?php class strtoupper_filter extends php_user_filter { #[\ReturnTypeWillChange] function filter($in, $out, &$consumed, $closing) { while ($bucket = stream_bucket_make_writeable($in)) { $bucket->data = strtoupper($bucket->data); $consumed += $bucket->datalen; stream_bucket_append($out, $bucket); } return PSFS_PASS_ON; } } $stdout = fopen('php://stdout', 'wb'); stream_filter_register('capture', strtoupper_filter::class); stream_filter_append($stdout, 'capture'); var_export(stream_isatty($stdout));

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.0080.00818.30
8.3.50.0070.00719.61
8.3.40.0160.00620.68
8.3.30.0140.00518.72
8.3.20.0100.00422.95
8.3.10.0090.00523.24
8.3.00.0070.00822.53
8.2.180.0110.01125.92
8.2.170.0150.00618.95
8.2.160.0120.00321.47
8.2.150.0110.00422.43
8.2.140.0070.00722.57
8.2.130.0060.00623.21
8.2.120.0120.00219.52
8.2.110.0080.00620.05
8.2.100.0130.00218.46
8.2.90.0050.00818.44
8.2.80.0060.00619.19
8.2.70.0060.00618.06
8.2.60.0050.00818.99
8.2.50.0030.01018.42
8.2.40.0130.00018.89
8.2.30.0050.00818.11
8.2.20.0050.00718.38
8.2.10.0070.00618.61
8.2.00.0050.00918.91
8.1.280.0110.00325.92
8.1.270.0080.00523.10
8.1.260.0070.00624.17
8.1.250.0100.00425.03
8.1.240.0020.01321.18
8.1.230.0130.00419.61
8.1.220.0040.01018.28
8.1.210.0050.01018.69
8.1.200.0080.00618.07
8.1.190.0030.01117.86
8.1.180.0110.00418.19
8.1.170.0090.00518.17
8.1.160.0100.00518.55
8.1.150.0050.01118.52
8.1.140.0030.00918.04
8.1.130.0060.00618.01
8.1.120.0040.00917.88
8.1.110.0090.00317.87
8.1.100.0060.00718.50
8.1.90.0080.00517.89
8.1.80.0030.01018.52
8.1.70.0070.00517.97
8.1.60.0070.00618.08
8.1.50.0050.00818.12
8.1.40.0100.00318.08
8.1.30.0100.00318.25
8.1.20.0030.01018.82
8.1.10.0070.00517.99
8.1.00.0050.00717.83
8.0.300.0080.00618.88
8.0.290.0110.00617.32
8.0.280.0140.00318.07
8.0.270.0100.00517.34
8.0.260.0130.00517.33
8.0.250.0130.00517.35
8.0.240.0140.00517.45
8.0.230.0130.00517.35
8.0.220.0150.00717.30
8.0.210.0180.00317.27
8.0.200.0190.00317.13
8.0.190.0140.00917.47
8.0.180.0130.00717.44
8.0.170.0160.00617.37
8.0.160.0070.00717.46
8.0.150.0140.00817.23
8.0.140.0100.01217.25
8.0.130.0160.00515.58
8.0.120.0160.00517.37
8.0.110.0120.00717.40
8.0.100.0110.00917.30
8.0.90.0150.00817.41
8.0.80.0220.00117.47
8.0.70.0100.00417.32
8.0.60.0180.00517.28
8.0.50.0130.01117.39
8.0.30.0050.00917.35
8.0.20.0180.00317.29
8.0.10.0100.00517.44
8.0.00.0110.00318.28
7.4.330.0090.00616.54
7.4.320.0170.00216.88
7.4.300.0130.00516.88
7.4.290.0170.00716.92
7.4.280.0240.00016.95
7.4.270.0160.00917.03
7.4.260.0190.00516.96
7.4.250.0190.00516.96
7.4.240.0190.00516.94
7.4.230.0160.00816.85
7.4.220.0140.00816.83
7.4.210.0190.00416.94
7.4.200.0120.01117.07
7.4.190.0190.00317.13
7.4.180.0160.00217.18
7.4.160.0180.00517.18
7.4.150.0180.00616.92
7.4.140.0110.01316.93
7.4.130.0180.00216.87
7.4.120.0180.00316.79
7.4.110.0150.00516.82
7.4.100.0200.00416.91
7.4.90.0210.00416.92
7.4.80.0130.01216.84
7.4.70.0190.00516.77
7.4.60.0160.00516.79
7.4.50.0160.00416.78
7.4.40.0170.00616.75
7.4.30.0140.00716.98
7.4.20.0120.00816.84
7.4.10.0130.00916.69
7.4.00.0140.00816.77
7.3.330.0160.00616.65
7.3.320.0170.00315.21
7.3.310.0200.00516.78
7.3.300.0160.00616.96
7.3.290.0190.00616.58
7.3.280.0130.00616.64
7.3.270.0180.00416.71
7.3.260.0170.00616.83
7.3.250.0200.00216.73
7.3.240.0160.00616.78
7.3.230.0130.00916.85
7.3.220.0220.00516.52
7.3.210.0150.00616.70
7.3.200.0180.00516.65
7.3.190.0160.00716.76
7.3.180.0180.00516.44
7.3.170.0170.00416.99
7.3.160.0140.01016.58
7.3.150.0150.00916.64
7.3.140.0190.00516.51
7.3.130.0210.00516.52
7.3.120.0160.00616.72
7.3.110.0140.00616.76
7.3.100.0120.00716.65
7.3.90.0160.00617.01
7.3.80.0180.00316.72
7.3.70.0130.00617.16
7.3.60.0170.00316.68
7.3.50.0150.00516.90
7.3.40.0130.00716.72
7.3.30.0180.00416.80
7.3.20.0240.00217.60
7.3.10.0180.00817.50
7.3.00.0170.00717.53

preferences:
61.4 ms | 401 KiB | 5 Q