3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $refundDelays = ['66', 66, '0', 0, '', null, false, 'caca maca', ' ', '1.e2']; foreach($refundDelays as $value) { $b = ctype_digit($value); $c = is_int($value) || ctype_digit($value); var_dump($value); var_dump($b); var_dump($c); }
based on 0P6DD
Output for 5.6.0 - 7.3.0beta1
string(2) "66" bool(true) bool(true) int(66) bool(false) bool(true) string(1) "0" bool(true) bool(true) int(0) bool(false) bool(true) string(0) "" bool(false) bool(false) NULL bool(false) bool(false) bool(false) bool(false) bool(false) string(9) "caca maca" bool(false) bool(false) string(1) " " bool(false) bool(false) string(4) "1.e2" bool(false) bool(false)