3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { const PHONE_NUMBER_LIST_OPTION_TRIM_EXTENSION=0x01; // 0b00000001 const PHONE_NUMBER_LIST_OPTION_ONLY_WITH_EXTENSION=0x02; // 0b00000010 public static function test($options=null) { $options=intval($options); echo "TEST: ".decbin($options)."\n"; var_dump($options&self::PHONE_NUMBER_LIST_OPTION_TRIM_EXTENSION); var_dump($options&self::PHONE_NUMBER_LIST_OPTION_ONLY_WITH_EXTENSION); echo "\n\n"; } } A::test(); A::test(A::PHONE_NUMBER_LIST_OPTION_TRIM_EXTENSION); A::test(A::PHONE_NUMBER_LIST_OPTION_ONLY_WITH_EXTENSION); A::test(A::PHONE_NUMBER_LIST_OPTION_TRIM_EXTENSION&A::PHONE_NUMBER_LIST_OPTION_ONLY_WITH_EXTENSION);
Output for git.master, git.master_jit, rfc.property-hooks
TEST: 0 int(0) int(0) TEST: 1 int(1) int(0) TEST: 10 int(0) int(2) TEST: 0 int(0) int(0)

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
60 ms | 401 KiB | 8 Q