mirror of
https://github.com/php/php-src.git
synced 2024-12-12 11:23:53 +08:00
40 lines
421 B
PHP
40 lines
421 B
PHP
--TEST--
|
|
bitwise AND and strings
|
|
--FILE--
|
|
<?php
|
|
|
|
$s = "123";
|
|
$s1 = "234";
|
|
|
|
var_dump($s & $s1);
|
|
|
|
$s = "test";
|
|
$s1 = "some";
|
|
|
|
var_dump($s & $s1);
|
|
|
|
$s = "test long";
|
|
$s1 = "some";
|
|
|
|
var_dump($s & $s1);
|
|
|
|
$s = "test";
|
|
$s1 = "some long";
|
|
|
|
var_dump($s & $s1);
|
|
|
|
$s = "test";
|
|
$s &= "some long";
|
|
|
|
var_dump($s);
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECTF--
|
|
string(3) "020"
|
|
string(4) "pead"
|
|
string(4) "pead"
|
|
string(4) "pead"
|
|
string(4) "pead"
|
|
Done
|