3v4l.org

run code in 200+ PHP versions simultaneously
<?php var_dump(decbin(~0)); var_dump(decbin(-1)); var_dump(decbin(~PHP_INT_MAX));
based on cHkPX
Output for 4.4.0 - 4.4.9, 5.0.5 - 7.4.4
string(64) "1111111111111111111111111111111111111111111111111111111111111111" string(64) "1111111111111111111111111111111111111111111111111111111111111111" string(64) "1000000000000000000000000000000000000000000000000000000000000000"
Output for 4.3.0 - 4.3.11, 5.0.0 - 5.0.4
string(64) "1111111111111111111111111111111111111111111111111111111111111111" string(64) "1111111111111111111111111111111111111111111111111111111111111111" Notice: Use of undefined constant PHP_INT_MAX - assumed 'PHP_INT_MAX' in /in/XX9r5 on line 5 string(1) "0"