Ben maçı (- $a maçlar dizi içeren preg_match() kullanarak) bir düzenli ifade gelen ile substr() kullanarak sorunları yaşıyorum.
Echo'ing zaman a[1] (ben gettype() kullanılarak kontrol ettik) eşittir 0xe84 ve bir dizedir.
substr($file, $a[2], $a[1]); //not working...
But if I do (Also note I can't actually do this as the third parem is generic coming from a regex - this is just used to illustrate my problem):
substr($file, $a[2], 0xe84); //works fine - when entering the match directly as an integer
Neden substr() 3 parem bir tamsayı türü olduğu zaman çalışır, ve gayet iyi çalışıyor bu yüzden nasıl $a[1] tamsayı yapabilirsiniz Yani benim soru?
I [(3 {ancak, intval() hem de settype(integer) $a[1] on kullanılarak ((int) kullanarak) tipi döküm yaparak denedik )]} sonra olur 0 (ve substr() çalışmaz).
