PageRenderTime 68ms CodeModel.GetById 65ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/hphp/test/zend/good/Zend/tests/empty_with_expr.php

http://github.com/facebook/hiphop-php
PHP | 18 lines | 13 code | 5 blank | 0 comment | 0 complexity | bb54312cdef3fb17137a3e250cc1f956 MD5 | raw file
 1<?php
 2
 3function getEmptyArray() { return []; }
 4function getNonEmptyArray() { return [1, 2, 3]; }
 5
 6var_dump(empty([]));
 7var_dump(empty([1, 2, 3]));
 8
 9var_dump(empty(getEmptyArray()));
10var_dump(empty(getNonEmptyArray()));
11
12var_dump(empty([] + []));
13var_dump(empty([1, 2, 3] + []));
14
15var_dump(empty("string"));
16var_dump(empty(""));
17var_dump(empty(true));
18var_dump(empty(false));