Changes between Initial Version and Version 1 of Ticket #49853, comment 5
- Timestamp:
- 04/09/2020 08:39:13 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #49853, comment 5
initial v1 5 5 In my testing `if ( trim( $post_title ) === '' )` works as expected and maintains the strict comparison: 6 6 7 `$tests = array( 0, NULL, 'foo', '', '0' ); 7 {{{#!php 8 <?php 9 $tests = array( 0, NULL, 'foo', '', '0' ); 8 10 foreach ( $tests as $test ) { 9 11 if ( '' === trim( $test ) ) { … … 11 13 echo ' is empty!'; 12 14 } 13 }` 15 } 16 }}} 17