3v4l.org

run code in 300+ PHP versions simultaneously
<?php $body = [ 'key2' => ' abc ', 'key3' => false, 'key4' => true, 'key5' => null, ]; $body = filter_var($body, FILTER_CALLBACK, ['options' => 'trim']); var_export($body);

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.0070.01016.58
8.3.60.0070.01018.07
8.3.50.0060.01316.21
8.3.40.0070.00718.68
8.3.30.0150.00418.42
8.3.20.0070.00021.73
8.3.10.0000.00821.77
8.3.00.0040.00421.79
8.2.180.0150.00625.92
8.2.170.0100.00718.99
8.2.160.0150.00022.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0080.00022.30
8.2.120.0070.00026.35
8.2.110.0070.00322.18
8.2.100.0040.00717.72
8.2.90.0090.00019.70
8.2.80.0040.00417.97
8.2.70.0080.00017.78
8.2.60.0040.00418.03
8.2.50.0080.00018.10
8.2.40.0050.00319.21
8.2.30.0070.00020.48
8.2.20.0050.00417.86
8.2.10.0070.00019.15
8.2.00.0040.00418.01
8.1.280.0110.00725.92
8.1.270.0040.00420.23
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.01422.24
8.1.230.0080.00419.09
8.1.220.0050.00317.79
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0000.00917.13
8.1.180.0060.00318.10
8.1.170.0030.00618.61
8.1.160.0050.00218.75
8.1.150.0000.00718.83
8.1.140.0020.00518.81
8.1.130.0030.00320.23
8.1.120.0080.00017.40
8.1.110.0030.00517.40
8.1.100.0000.00817.44
8.1.90.0040.00417.40
8.1.80.0000.00717.40
8.1.70.0030.00317.23
8.1.60.0030.00617.40
8.1.50.0050.00417.36
8.1.40.0030.00617.44
8.1.30.0050.00317.62
8.1.20.0080.00017.55
8.1.10.0000.00717.45
8.1.00.0100.00317.35
8.0.300.0050.00319.54
8.0.290.0060.00316.63
8.0.280.0050.00318.37
8.0.270.0020.00516.60
8.0.260.0030.00318.43
8.0.250.0030.00616.82
8.0.240.0030.00616.87
8.0.230.0040.00416.89
8.0.220.0070.00416.88
8.0.210.0070.00016.72
8.0.200.0000.00616.91
8.0.190.0050.00216.79
8.0.180.0040.00416.70
8.0.170.0040.00416.85
8.0.160.0040.00416.80
8.0.150.0000.00716.73
8.0.140.0030.00316.79
8.0.130.0030.00313.20
8.0.120.0040.00416.69
8.0.110.0040.00416.73
8.0.100.0030.00316.75
8.0.90.0040.00416.93
8.0.80.0040.01116.79
8.0.70.0000.00716.65
8.0.60.0040.00416.72
8.0.50.0050.00216.86
8.0.30.0080.01017.12
8.0.20.0060.01316.97
8.0.10.0000.00717.00
8.0.00.0080.01316.64
7.4.330.0000.00516.71
7.4.320.0040.00416.47
7.4.300.0000.00616.55
7.4.290.0030.00316.52
7.4.280.0070.00016.34
7.4.270.0030.00316.41
7.4.260.0040.00416.51
7.4.250.0040.00416.51
7.4.240.0030.00516.42
7.4.230.0000.00716.18
7.4.220.0030.00316.31
7.4.210.0040.01016.57
7.4.200.0000.00716.57
7.4.160.0070.01216.39
7.4.140.0100.00917.86
7.4.130.0110.00716.32
7.4.120.0100.01016.53
7.4.110.0130.01016.37
7.4.100.0120.00616.45
7.4.90.0030.01916.42
7.4.80.0110.01019.39
7.4.70.0070.01016.37
7.4.60.0070.01016.33
7.4.50.0000.01716.27
7.4.40.0060.01616.31
7.4.00.0000.01414.67
7.3.330.0000.00512.93
7.3.320.0000.00512.97
7.3.310.0070.00016.13
7.3.300.0000.00716.04
7.3.290.0080.00516.14
7.3.280.0070.01016.12
7.3.260.0110.00616.25
7.3.240.0100.00616.35
7.3.230.0070.01016.49
7.3.210.0090.00916.52
7.3.200.0130.00316.34
7.3.190.0130.00916.20
7.3.180.0060.01016.40
7.3.170.0060.01116.32
7.3.160.0120.00916.07
7.3.120.0060.00914.91
7.3.110.0000.01614.58
7.3.100.0100.00314.45
7.3.90.0070.00714.48
7.3.80.0060.01014.62
7.3.70.0090.00614.66
7.3.60.0030.01014.70
7.3.50.0030.01314.67
7.3.40.0100.00314.47
7.3.30.0070.00814.67
7.3.20.0100.00915.51
7.3.10.0120.00715.52
7.3.00.0110.00715.59
7.2.330.0130.00316.63
7.2.320.0180.00016.49
7.2.310.0070.01316.23
7.2.300.0120.00416.39
7.2.290.0100.01016.58
7.2.240.0070.00714.88
7.2.230.0080.00314.86
7.2.220.0100.00315.20
7.2.210.0000.01615.19
7.2.200.0130.00314.87
7.2.190.0070.01114.85
7.2.180.0040.01514.96
7.2.170.0080.00914.75
7.2.160.0050.01014.81
7.2.150.0090.00615.80
7.2.140.0100.00815.66
7.2.130.0130.00715.85
7.2.120.0120.00215.73
7.2.110.0110.00615.74
7.2.100.0120.00815.62
7.2.90.0080.00915.75
7.2.80.0110.00615.61
7.2.70.0120.00515.60
7.2.60.0090.00915.76
7.2.50.0140.01115.63
7.2.40.0100.01015.71
7.2.30.0140.00815.72
7.2.20.0280.00915.65
7.2.10.0110.01015.50
7.2.00.0090.00815.76
7.1.330.0070.00715.66
7.1.320.0100.00315.92
7.1.310.0120.00315.46
7.1.300.0120.00015.47
7.1.290.0080.00415.68
7.1.280.0110.00514.76
7.1.270.0140.00514.66
7.1.260.0090.00514.70
7.1.250.0080.00614.47

preferences:
59.41 ms | 401 KiB | 5 Q