1)1ͷ&0-͏͙͢ʂ
w 1)1ͷηΩϡϦςΟमਖ਼ͷఏڙ·Ͱ
IUUQTXXXQIQOFUTVQQPSUFEWFSTJPOTQIQ
ŘŵŠŠʂ
Slide 3
Slide 3 text
1)1ͷ&0-͏͙͢ʂ
w 1)1ͷηΩϡϦςΟमਖ਼ͷఏڙ·Ͱ
IUUQTXXXQIQOFUTVQQPSUFEWFSTJPOTQIQ
ŘŵŠŠʂ
1)1ܥʹΞοϓσʔτ͠Α͏ʂ
Slide 4
Slide 4 text
ࣗݾհ
w ؒਔࢤ ͔͋·ͻͱ͠
ग़ɿౡࠜݝদߐࢢ
झຯϓϥϨʔϧͰܭࢉ͢Δ͜ͱ
w αΠϘζגࣜձࣾʹ৽ଔೖࣾ
(BSPPO։ൃνʔϜʹॴଐ
w 1)1ྺʙ͘Β͍
ϓϥϨʔϧCJUΧϯλ
Slide 5
Slide 5 text
ຊηογϣϯͷ֓ཁ
w ϨΨγʔϓϩμΫτͷ1)1ͷόʔδϣϯΛ͔Βʹߋ৽͠·ͨ͠
ؙҰ͔͔Γ·ͨ͠
େ͖ͳτϥϒϧͳ͘Ͱ͖·ͨ͠
w Ͳ͏͍ͬͨ՝͕͋ΓɺͲͷΑ͏ͳରࡦΛͱ͔ͬͨΛڞ༗͠·͢
ͱʹ͔͘ޓੑʹ·ͭΘΔΛૣظൃݟ͢Δ͜ͱ͕ॏཁ
Slide 6
Slide 6 text
ΞδΣϯμ
w എܠ
w ϦϦʔεαΠΫϧͱϒϥϯνઓུ
w ൺֱԋࢉࢠͷରࡦ
w ઈົʹڍಈ͕มΘΔඪ४ϥΠϒϥϦؔ
w ·ͱΊ
Slide 7
Slide 7 text
αΠϘζͷ(BSPPOʹ͍ͭͯ
w தنʙେنͳ৫͚ͷάϧʔϓΣΞ
༧ఆڞ༗ɺίϛϡχέʔγϣϯͳͲɺ৫ͷνʔϜϫʔΫΛࢧԉ
w DZCP[VDPN͕ఏڙ͢ΔΫϥυ൛ͱɺΦϯϓϨ൛Λఏڙ
w ࠓͰఏڙ։͔࢝ΒपʢΫϥυ൛͔Βʣ
w όοΫΤϯυ1)1.Z42-
ಠࣗϑϨʔϜϫʔΫ
Slide 8
Slide 8 text
Slide 9
Slide 9 text
(BSPPOͷ։ൃঢ়گ
w 1)1ͷ͔࣌Βଓ͘౷ͷιʔείʔυ
SFRVJSF@PODFɺԋࢉࢠΛଟ༻ɻݹ͍ίʔυͷՄಡੑ͕͍
w ڊେͳίʔυϕʔεʢ1)1͚ͩͰສߦʣ
w ϢχοτςετͷΧόϨοδ
ίʔυͷอक͚ͩͰෛ୲͕େ͖͍
Slide 10
Slide 10 text
1)1ຊମͷϏϧυ
w (BSPPOͰ1)1ຊମΛࣗલͰϏϧυ͍ͯ͠Δ
w (BSPPOಠࣗͷ1)1֦ு͕͋Δʢ$ݴޠͰॻ͔Ε͍ͯΔʣ
w 1)1ຊମͷίʔυΛվ͍ͯ͠Δ
ύονϑΝΠϧͱͯ͠վՕॴΛϦϙδτϦʹஔ
1)1ͷϏϧυपΓ(BSPPOͷ։ൃʹؚ·ΕΔ
͚ͨ͜ͱͷޮՌ
w ͦΕͧΕͷมߋʹ͍ͭͯݟ͕ਂ·ΓɺνʔϜͰௐࠪํ๏Λ౷ҰͰ͖ͨ
w ߲ʹΑͬͯࣗಈతʹௐࠪͰ͖ͨ
w ࣗಈௐࠪ༻ͷεΫϦϓτΛ࡞
ਓྗͰௐࠪ͢Δ߲݅΄Ͳʹ
Ϛʔδ࣌ͷӨڹௐࠪͷίετΛݮͰ͖ͨ
Slide 25
Slide 25 text
ϚχϡΞϧΛಡΜ͚ͩͩͰશͯ͏·͍͔͘͘ʁ
w ࣮ࡍʹͲΕ͘Β͍͕ग़Δ͔ະ
w ϚχϡΞϧʹॻ͍ͯͳ͍͜ͱ͕Өڹ͢Δ͔͠Εͳ͍
Ͳ͜·Ͱमਖ਼ΛՃ͑Ε$*͕௨ΔΑ͏ʹͳΔʁ
Slide 26
Slide 26 text
(BSPPOͷ$* $JSDMF$*
w 1)1Ξοϓσʔτʹେ͖ؔ͘ΘΔͷҎԼͷεςοϓ
1)1ຊମͷϏϧυঢ়گ͕ෳࡶ
1)1ͷϏϧυ
Ϣχοτςετ
1)16OJU
&&ςετ
4FMFOJVN
Slide 27
Slide 27 text
1)1ͷόʔδϣϯ্͚ͩ͛ͨϒϥϯν
w ςετɾϨϏϡʔෆཁͷঢ়ଶͰΨϯΨϯΛղফ͍ͯͬͯ͠ΈΔ
w ݟ͔ͭͬͨɿ
1)1ຊମ͕มߋ͞ΕͨͨΊύονϑΝΠϧ͕ద༻Ͱ͖ͳ͍
1)1֦ுͰఆٛ͞ΕͨΫϥεͷίϯετϥΫλ໊͕ݹ͍ܗࣜͩͬͨ
ϚχϡΞϧΛಡΉ͚ͩͰ͔Βͳ͍ΛૣظൃݟͰ͖ͨ
Slide 28
Slide 28 text
ϒϥϯνઓུɿ·ͱΊ
w 1)1ͷΞοϓσʔτฒߦ͢ΔϒϥϯνͰߦΘΕΔ
1)1ͷόʔδϣϯΛৗʹҙࣝͯ͠։ൃΛਐΊΔ
w ௐࠪํ๏ͱௐࠪ݁ՌΛ͢Δ͜ͱͰௐࠪͷݟ௨͕͠Α͘ͳΔ
࠶ݱੑͷ͋Δௐࠪํ๏ΛνʔϜͰڞ༗Ͱ͖Δ
w 1)1ͷόʔδϣϯ্͚ͩ͛ΔϒϥϯνͰࢼͯ͠ΈΔ
ݻ༗ͷΛૣ͍ஈ֊Ͱચ͍ग़͢͜ͱ͕Ͱ͖Δ
Slide 29
Slide 29 text
ΞδΣϯμ
w എܠ
w ϦϦʔεαΠΫϧͱϒϥϯνઓུ
wൺֱԋࢉࢠͷରࡦ
w ઈົʹڍಈ͕มΘΔඪ४ϥΠϒϥϦؔ
w ·ͱΊ
Slide 30
Slide 30 text
1)1Ͱൺֱԋࢉ͕มΘΔ
1)13'$4BOFSTUSJOHUPOVNCFSDPNQBSJTPOT
1)13'$4BOFSOVNFSJDTUSJOHT
w ͲͪΒڍಈΛײతͰ߹ੑΛͱΔΑ͏ʹ͢ΔఏҊ
ੈͷதʹͦ͏͍ͬͨڍಈʹʢ҉తʹʣґଘ͍ͯ͠ΔγεςϜ͋Δ
ϓϩάϥϛϯάݴޠͷࠜװʹؔΘΔಈ࡞͕มΘΔ
ௐࠪͷ݁Ռ
w ϲ݄Ͱ݅ͷΛݕग़
w ൺֱԋࢉࢠʹΑΔݒ೦͕΄ͱΜͲͳ͍ঢ়ଶͰ1)1ҠߦͰ͖ͨ
w ݱࡏͷ(BSPPOͰɺൺֱԋࢉࢠ·ΘΓͷτϥϒϧൃੜ͍ͯ͠ͳ͍
(BSPPOͰൺֱԋࢉࢠͷΛͯ͢ղফͰ͖ͨ
Slide 44
Slide 44 text
ൺֱԋࢉࢠɿ·ͱΊ
w ൺֱԋࢉͷมԽൺֱԋࢉࢠҎ֎ʹӨڹΛ༩͑Δ
w (BSPPOͰ1)1ຊମΛվ͠ɺൺֱԋࢉͷڍಈมԽΛݕग़
ڍಈͷมԽΛΤϥʔͱͯ͠Θ͔ΔܗͰදࣔ
खಈɾࣗಈςετͰམͱ͢͜ͱ͕Ͱ͖ͨ
w ຊ൪ڥΛར༻ͨ͠ͷݕग़͕ޭΛͨ͠
w Ҏ্ͷରࡦͰɺൺֱԋࢉʹ·ͭΘΔΛղܾͨ͠
Slide 45
Slide 45 text
ΞδΣϯμ
w എܠ
w ϦϦʔεαΠΫϧͱϒϥϯνઓུ
w ൺֱԋࢉࢠͷରࡦ
wઈົʹڍಈ͕มΘΔඪ४ϥΠϒϥϦؔ
w ·ͱΊ
Slide 46
Slide 46 text
ઈົʹڍಈ͕มΘΔඪ४ؔ
w 1)1ϚχϡΞϧͷʮԼҐޓੑͷͳ͍มߋʯʹ·ͱΊΒΕ͍ͯΔ
w େମͷ߹%FQSFDBUFEͷܯࠂ͕1)1Ͱൃੜ͢Δ
w ͦ͏Ͱͳ͍ؔΛத৺ʹհ
NLUJNF
HNNLUJNF
BSSBZ@TQMJDF
TVCTUS
TUSQPT
NC@TUSQPT
Slide 47
Slide 47 text
ҾʹOVMM͕ࢦఆͰ͖ΔΑ͏ʹͳΔؔ
w 1)1͔ΒɺҰ෦ͷҾʹOVMM͕ࢦఆͰ͖Δ
• substr(), array_splice()
• mktime(), gmmktime()
OVMMΛࢦఆͨ͠߹ͷڍಈ͕มΘΔ
Slide 48
Slide 48 text
TVCTUS
BSSBZ@TQMJDF
w ͲͪΒMFOHUIҾʹOVMMΛࢦఆՄೳʹͳͬͨ
w 1)1ҎલOVMM͕ͱղऍ͞ΕΔ
w 1)1Ҏ߱ɺҾΛ༩͑ͳ͍ͷͱಉ͡Α͏ʹղऍ͞ΕΔ
IUUQTWMPSH
Slide 49
Slide 49 text
NLUJNF
HNNLUJNF
w ͔Β6OJYλΠϜελϯϓΛٻΊΔ
mktime($hour, $minute, $second, $month, $day, $year)
w 1)1ҎલOVMMʹΩϟετ͞Ε͍ͯͨ
w 1)1Ҏ߱OVMM͕ݱࡏ࣌ࠁΛද͢Α͏ʹͳͬͨ
ݱࡏͷ࣌ʹΑͬͯ݁Ռ͕มΘΔόάͷՄೳੑ
TVCTUS
ͷڥքΛӽ͑ͨ߹ͷॲཧ
1)1·ͰɿMFOHUIͷਖ਼ෛͳͲʹΑΓGBMTF͔ۭจࣈྻ
1)1͔ΒɿඞۭͣจࣈྻʹͳΔ
w TUSJOH
P
ff
TFU
" # $
MFOHUI
Slide 52
Slide 52 text
(BSPPOͰͷରॲํ
w ݸผରॲ͕ՄೳͳͳΒͦͷ··ରॲΛਐΊΔ
w ෆՄೳͳΒݹ͍ڍಈΛΤϛϡϨʔτ͢ΔؔͰஔ͖͑
ྫNC@TUSQPT
function cb_mb_strpos($haystack, $needle, $offset = 0, $encoding = null)
{
if ($needle === "" || $needle === null) {
return false;
}
return mb_strpos($haystack, $needle, $offset, $encoding);
}
Slide 53
Slide 53 text
ઈົʹڍಈ͕มΘΔඪ४ؔɿ·ͱΊ
OVMMΛड͚ೖΕΔΑ͏ʹͳΔؔ
OVMMΛͨ͠Βڍಈ͕มΘΔؔ
w TVCTUS
BSSBZ@TQMJDF
NLUJNF
HNNLUJNF
ʹҙ
Slide 54
Slide 54 text
·ͱΊ
Slide 55
Slide 55 text
1)1Ξοϓσʔτ૯·ͱΊ
w ϓϩμΫτͷϒϥϯνͷಈ͖Λҙࣝͨ͠1)1Ξοϓσʔτ
Ұؒͷ׆ಈظؒΛܦͯແࣄʹΞοϓσʔτྃ
1)1ϚχϡΞϧʗ࣮ࡍͷϓϩμΫτΛͱʹͨ͠ૣظͷௐࠪͰݟΛಘΔ
w ൺֱԋࢉࢠͷมԽΛݕ͢ΔΈ͕ޭΛͨ͠
ຊ൪ڥΛ༻͍ͨௐࠪͰෆ҆Λ১Ͱ͖ͨ
w ͱʹ͔͘ɺޓੑʹ·ͭΘΔΛૣظൃݟ͢Δ͜ͱ͕ॏཁͩͬͨ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠
Slide 56
Slide 56 text
એɿ࠲ஊձΓ·͢
IUUQTDZCP[VDPOOQBTTDPNFWFOU
Slide 57
Slide 57 text
ະ༻εϥΠυ
Slide 58
Slide 58 text
1)1ͷ෦"1*ʹ·ͭΘΔมߋ
w $JSDMF$*ͷδϣϒͰ1)1Λιʔε͔ΒϏϧυ
ಠࣗͷ1)1֦ுʢ$ݴޠͰॻ͔Ε֦ͨுϞδϡʔϧʣ͕͋Δ
1)1ຊମͷιʔείʔυΛมߋ͢ΔύονϑΝΠϧΛ͍͔ͭ͘ద༻
w Ϗϧυ͞Ε࣮ͨߦϑΝΠϧҰࣜ4ʹΞοϓϩʔυ͞ΕΔ
w -JOVY8JOEPXT͚ͷϏϧυڥ͕͋Δ
Slide 59
Slide 59 text
1)1ͷ෦"1*ʹ·ͭΘΔมߋ
w 1)1֦ுͷ࡞ऀͷͨΊͷҠߦϚχϡΞϧ͕QIQTSDʹ͋Δ
IUUQTHJUIVCDPNQIQQIQTSDCMPCNBTUFS
61(3"%*/(*/5&3/"-4
w (BSPPOຖͳʹ͔͠ΒͷΛ౿ΜͰ֦ுͷίʔυΛमਖ਼͍ͯ͠Δ
w ͪ͜Βಉ͡Α͏ʹɺௐࠪͯ͠վमΛߦ͏
w ͨͩ͠ɺมߋස͕গͳ͍ͨΊجຊతʹௐࠪճ͖ΓͰे
Slide 60
Slide 60 text
1)1ͷ෦"1*ʹ·ͭΘΔมߋ
w ؔɾϝιουʹBSHJOGPΛ༩͑ͳ͍ͱ8BSOJOHʹͳΔ
Ҿͷใʢ໊લɺܕʣͷใΛ1)1֦ுͰఆٛͨؔ͠ʹ༩͑Δ
w 543.ϚΫϩͷഇࢭ
εϨουηʔϑܥͷରԠɻ1)1ܥͰ࣮࣭ແޮԽ͞ΕͨͨΊআ͢Δ͚ͩ
w Ϋϥεͱಉ໊ͷϝιου͕ίϯετϥΫλ໊ͱͯ͠ೝࣝ͞Εͳ͘ͳͬͨ
1)1εΫϦϓτͰܯࠂ͕ग़͍͕ͯͨɺ1)1֦ுͰܯࠂ͞Εͳ͔ͬͨ
Slide 61
Slide 61 text
1)1Τϥʔ
w Τϥʔͷൃੜ࣍ୈɺΤϥʔϋϯυϥʹΑΓॲཧ͞ΕΔ
w ྫ֎ͷΑ͏ʹݺग़ݩͱ͠ͳ͍ɻׂΓࠐΈϋϯυϥʹ͍ۙ
w &@%&13&$"5&%
&@/05*$&
&@8"3/*/(ͳͲɺ͍͔ͭ͘ͷϨϕϧ͕͋Δ
w FSSPS@SFQPSUJOHؔͰɺಛఆͷϨϕϧͷΤϥʔΛແࢹͤ͞Δ͜ͱ͕Ͱ͖Δ
w 1)1ϓϩάϥϜશମͰ༗ޮͳΧελϜͷϋϯυϥΛهड़Մೳ
w ΧελϜϋϯυϥͰ1)1ΤϥʔΛ੍͠ɺॲཧΛଓߦՄೳ
Slide 62
Slide 62 text
1)1Τϥʔ
w ͍͔ͭ͘ͷ&@/05*$&͕&@8"3/*/(ʹঢ֨
• Attempting to read an unde
fi
ned variable.
• Attempting to read an unde
fi
ned property.
• Attempting to read an unde
fi
ned array key.
• Attempting to read a property of a non-object.
• Attempting to access an array index of a non-array.
• Attempting to convert an array to string.
• Attempting to use a resource as an array key.
• Attempting to use null, a boolean, or a
fl
oat as a string offset.
• Attempting to read an out-of-bounds string offset.
• Attempting to assign an empty string to a string offset.
• جຊతʹ @ ԋࢉࢠґવͱͯ͠༗ޮɻΤϥʔϋϯυϥͰͷରॲͳ͘Ͱ͖Δ
Slide 63
Slide 63 text
1)1Τϥʔ
w ͋Δ044ͷதͰFSSPS@SFQPSUJOH
Ͱ&@/05*$&Λແޮʹ͍ͯͨ͠ʂ
w ͦͷ044͔ΒίʔϧόοΫ͞ΕΔܗͰҰ෦ͷίʔυ͕ಈ࡞ͯͨ͠
w ࠓ·Ͱ੍͞Ε͍ͯͨ&@/05*$&͕&@8"3/*/(ʹͳΓɺΕճΔ
w Өڹ͕͋·Γʹ͔ͬͨ
w ରॲɿFSSPS@SFQPSUJOH
Ͱ&@/05*$&͕ΒΕͯͨͱ͖ͷΈɺಛఆͷ
&@8"3/*/(ΛΤϥʔϋϯυϥͰ੍ͤ͞Δ
Slide 64
Slide 64 text
1)1Τϥʔ
w ͍··ͰجຊతʹΤϥʔϋϯυϥͰ੍͍ͯ͠ͳ͚Εͳ͍
• Attempting to write to a property of a non-object.
• Attempting to append an element to an array for which the PHP_INT_MAX key is already used.
• Attempting to use an invalid type (array or object) as an array key or string offset.
• Attempting to write to an array index of a scalar value.
• Attempting to unpack a non-array/Traversable.
• Attempting to access unquali
fi
ed constants which are unde
fi
ned.
w ͨͩɺ!ԋࢉࢠͰ੍͞Εͯͨ߹؏௨͢Δ
w ରॲ1)1ڥͰ͜ΕΒͷ&@8"3/*/(Λัଊ͠ɺϞχλ͢Δ
/6--ʹର͢ΔϓϩύςΟͷॻ͖ࠐΈ͕݅ݟ͔ͭͬͨ