3v4l.org

run code in 500+ PHP versions simultaneously
<?php function absint( $maybeint ): int { return abs( (int) $maybeint ); } function safe_absint( $maybeint ): int { $maybeint = (int) $maybeint; // Avoid PHP fatal error where we might return a float instead of an int if ( PHP_INT_MIN === $maybeint ) { return PHP_INT_MAX; } return abs( $maybeint ); } $stuff = -99999999999999999999; var_dump( safe_absint( $stuff ) ); var_dump( absint( $stuff ) );

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.5.90.0220.00616.93
8.5.80.0270.01016.68
8.5.70.0080.00216.84
8.5.60.0220.00616.80
8.5.50.0340.00716.74
8.5.40.0240.00416.41
8.5.30.0150.00516.39
8.5.20.0190.00216.48
8.5.10.0150.00616.80
8.5.00.0080.00316.54
8.4.240.0140.00719.20
8.4.230.0190.00219.24
8.4.220.0120.01019.14
8.4.210.0160.00819.42
8.4.200.0140.00719.30
8.4.190.0140.00619.68
8.4.180.0170.00519.30
8.4.170.0130.00819.61
8.4.160.0150.00619.64
8.4.150.0170.00519.47
8.4.140.0160.00517.40
8.4.130.0170.00417.55
8.4.120.0140.00717.66
8.4.110.0170.00317.74
8.4.100.0160.00417.72
8.4.90.0190.00317.73
8.4.80.0150.00717.77
8.4.70.0150.00617.82
8.4.60.0170.00417.68
8.4.50.0150.00617.59
8.4.40.0170.00717.44
8.4.30.0160.00517.62
8.4.20.0180.00417.49
8.4.10.0150.00617.17
8.3.330.0070.00418.25
8.3.320.0160.00518.20
8.3.310.0180.00218.04
8.3.300.0140.00518.31
8.3.290.0170.00418.02
8.3.280.0160.00318.07
8.3.270.0150.00616.59
8.3.260.0130.00716.57
8.3.250.0160.00516.59
8.3.240.0170.00416.68
8.3.230.0180.00316.50
8.3.220.0120.00816.46
8.3.210.0150.00416.45
8.3.200.0150.00416.61
8.3.190.0150.00516.62
8.3.180.0190.00116.64
8.3.170.0150.00516.82
8.3.160.0160.00416.61
8.3.150.0150.00516.63
8.3.140.0160.00416.54
8.3.130.0140.00416.55
8.3.120.0170.00316.55
8.3.110.0120.00616.54
8.3.100.0150.00616.48
8.3.90.0180.00316.49
8.3.80.0190.00216.34
8.3.70.0200.00216.45
8.3.60.0130.00816.48
8.3.50.0170.00416.34
8.3.40.0150.00617.84
8.3.30.0120.00417.76
8.3.20.0090.00717.78
8.3.10.0130.00417.87
8.3.00.0150.00217.86
8.2.330.0120.00618.05
8.2.320.0150.00518.00
8.2.310.0150.00617.82

preferences:
51.15 ms | 775 KiB | 5 Q