File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -3,17 +3,20 @@ function strval (str) {
3
3
// + original by: Brett Zamir (http://brett-zamir.me)
4
4
// + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
5
5
// + bugfixed by: Brett Zamir (http://brett-zamir.me)
6
- // % note 1: Comment out the entire switch if you want JS-like behavior instead of PHP behavior
7
6
// - depends on: gettype
8
7
// * example 1: strval({red: 1, green: 2, blue: 3, white: 4});
9
- // * returns 1: 'Array'
8
+ // * returns 1: 'Object'
9
+
10
10
var type = '' ;
11
11
12
12
if ( str === null ) {
13
13
return '' ;
14
14
}
15
15
16
16
type = this . gettype ( str ) ;
17
+
18
+ // Comment out the entire switch if you want JS-like
19
+ // behavior instead of PHP behavior
17
20
switch ( type ) {
18
21
case 'boolean' :
19
22
if ( str === true ) {
You can’t perform that action at this time.
0 commit comments