3v4l.org

run code in 300+ PHP versions simultaneously
<?php function check_type($value) { var_dump($value); return $value; } $values = [ null, false, true, 42, 45.15, 'hello', ['array1', 'array2', 15, 25], new stdClass(), gmp_init('4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444'), ]; foreach ($values as $value) { $filtered_var = filter_var($value, FILTER_CALLBACK, ['options' => 'check_type']); var_dump($filtered_var); }

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.140.0140.00817.46
8.4.130.0130.00617.94
8.4.120.0150.00520.59
8.4.110.0110.00822.66
8.4.100.0120.00917.76
8.4.90.0090.01117.81
8.4.80.0110.00918.12
8.4.70.0080.00117.90
8.4.60.0050.00417.96
8.4.50.0140.00718.59
8.4.40.0130.00617.87
8.4.30.0160.00318.80
8.4.20.0120.00621.49
8.4.10.0220.00919.41
8.3.270.0150.00716.53
8.3.260.0100.01116.66
8.3.250.0110.00918.98
8.3.240.0110.00516.54
8.3.230.0130.00616.57
8.3.220.0130.00717.11
8.3.210.0120.00716.76
8.3.200.0080.00816.64
8.3.190.0080.00816.49
8.3.180.0070.00116.63
8.3.170.0110.00717.19
8.3.160.0140.00416.67
8.3.150.0120.00617.18
8.3.140.0140.00616.94
8.3.130.0180.00016.66
8.3.120.0140.00316.57
8.3.110.0190.00016.69
8.3.100.0170.00316.41
8.3.90.0160.00616.83
8.3.80.0160.00516.43
8.3.70.0220.00016.40
8.3.60.0160.00316.71
8.3.50.0130.00716.51
8.3.40.0090.00917.28
8.3.30.0130.00417.44
8.3.20.0190.00017.30
8.3.10.0160.00017.39
8.3.00.0070.00417.34
8.2.290.0080.01120.61
8.2.280.0080.01020.68
8.2.270.0090.00917.38
8.2.260.0000.00716.57
8.2.250.0090.00616.62
8.2.240.0090.00916.77
8.2.230.0170.00016.61
8.2.220.0140.00316.46
8.2.210.0140.00416.75
8.2.200.0130.00516.49
8.2.190.0150.00316.48
8.2.180.0140.00416.38
8.2.170.0070.01017.63
8.2.160.0160.00217.70
8.2.150.0160.00717.41
8.2.140.0180.00017.75
8.2.130.0190.00017.55
8.2.120.0130.00617.66
8.2.110.0190.00017.23
8.2.100.0190.00017.57
8.2.90.0150.00417.55
8.2.80.0190.00317.69
8.2.70.0180.00017.36
8.2.60.0110.00717.51
8.2.50.0150.00317.32
8.2.40.0130.00217.38
8.2.30.0140.00317.45
8.2.20.0150.00017.52
8.2.10.0080.00817.51
8.2.00.0120.00617.50
8.1.330.0100.00916.64
8.1.320.0140.00616.20
8.1.310.0120.00616.30
8.1.300.0110.00716.02
8.1.290.0140.00615.93
8.1.280.0150.00315.85
8.1.270.0170.00317.11
8.1.260.0090.00917.18
8.1.250.0150.00317.26
8.1.240.0150.00217.16
8.1.230.0090.00617.47
8.1.220.0080.00817.29
8.1.210.0130.00417.26
8.1.200.0110.00517.27
8.1.190.0140.00417.18
8.1.180.0170.00017.36
8.1.170.0070.01017.16
8.1.160.0040.01217.20
8.1.150.0080.00817.22
8.1.140.0110.00517.39
8.1.130.0080.00817.16
8.1.120.0080.00817.12
8.1.110.0190.00017.02
8.1.100.0160.00017.17
8.1.90.0130.00417.20
8.1.80.0090.00617.07
8.1.70.0090.00917.10
8.1.60.0110.00817.47
8.1.50.0180.00017.31
8.1.40.0200.00017.30
8.1.30.0130.00417.29
8.1.20.0150.00317.66
8.1.10.0120.00417.29
8.1.00.0180.00417.52

preferences:
30.64 ms | 403 KiB | 5 Q