diff options
author | Andrea Faulds <ajf@ajf.me> | 2014-12-13 21:11:09 +0000 |
---|---|---|
committer | Andrea Faulds <ajf@ajf.me> | 2014-12-13 21:11:09 +0000 |
commit | 8c99b65c4d2bc91aff7efce6f88713ebcb5d55c5 (patch) | |
tree | 1426f5c87e2b81475672157fc55c25b316da22af /Zend/tests | |
parent | 0ea0b591d79ae0ee18d33533a5c701330836ff6b (diff) | |
download | php-git-8c99b65c4d2bc91aff7efce6f88713ebcb5d55c5.tar.gz |
Fixed memory leak introduced by 73458e8f
Diffstat (limited to 'Zend/tests')
-rw-r--r-- | Zend/tests/self_and.phpt | 25 | ||||
-rw-r--r-- | Zend/tests/self_mod.phpt | 25 | ||||
-rw-r--r-- | Zend/tests/self_or.phpt | 25 | ||||
-rw-r--r-- | Zend/tests/self_xor.phpt | 25 |
4 files changed, 100 insertions, 0 deletions
diff --git a/Zend/tests/self_and.phpt b/Zend/tests/self_and.phpt new file mode 100644 index 0000000000..cdcde77992 --- /dev/null +++ b/Zend/tests/self_and.phpt @@ -0,0 +1,25 @@ +--TEST-- +ANDing strings +--FILE-- +<?php + +$s = "123"; +$s1 = "test"; +$s2 = "45345some"; + +$s &= 22; +var_dump($s); + +$s1 &= 11; +var_dump($s1); + +$s2 &= 33; +var_dump($s2); + +echo "Done\n"; +?> +--EXPECTF-- +int(18) +int(0) +int(33) +Done diff --git a/Zend/tests/self_mod.phpt b/Zend/tests/self_mod.phpt new file mode 100644 index 0000000000..19e45d88fc --- /dev/null +++ b/Zend/tests/self_mod.phpt @@ -0,0 +1,25 @@ +--TEST-- +Moduloing strings +--FILE-- +<?php + +$s = "123"; +$s1 = "test"; +$s2 = "45345some"; + +$s %= 22; +var_dump($s); + +$s1 %= 11; +var_dump($s1); + +$s2 %= 33; +var_dump($s2); + +echo "Done\n"; +?> +--EXPECTF-- +int(13) +int(0) +int(3) +Done diff --git a/Zend/tests/self_or.phpt b/Zend/tests/self_or.phpt new file mode 100644 index 0000000000..ae667bff16 --- /dev/null +++ b/Zend/tests/self_or.phpt @@ -0,0 +1,25 @@ +--TEST-- +ORing strings +--FILE-- +<?php + +$s = "123"; +$s1 = "test"; +$s2 = "45345some"; + +$s |= 22; +var_dump($s); + +$s1 |= 11; +var_dump($s1); + +$s2 |= 33; +var_dump($s2); + +echo "Done\n"; +?> +--EXPECTF-- +int(127) +int(11) +int(45345) +Done diff --git a/Zend/tests/self_xor.phpt b/Zend/tests/self_xor.phpt new file mode 100644 index 0000000000..a7e43f539d --- /dev/null +++ b/Zend/tests/self_xor.phpt @@ -0,0 +1,25 @@ +--TEST-- +XORing strings +--FILE-- +<?php + +$s = "123"; +$s1 = "test"; +$s2 = "45345some"; + +$s ^= 22; +var_dump($s); + +$s1 ^= 11; +var_dump($s1); + +$s2 ^= 33; +var_dump($s2); + +echo "Done\n"; +?> +--EXPECTF-- +int(109) +int(11) +int(45312) +Done |