<?php
$a = "CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `user` AS select `kunde`.`kundeId` AS `id`,`kunde`.`email1` AS `email`,`kunde`.`password` AS `emailLoginToken`,`kunde`.`passwordHash` AS `passwordHash`,`kunde`.`lastFailedLogin` AS `lastFailedLogin`,`kunde`.`navn1` AS `name`,`kunde`.`efternavn1` AS `lastname`,`kunde`.`telefon1` AS `telephone`,`kunde`.`adresse1` AS `address`,`kunde`.`firmanavn` AS `company`,`kunde`.`postnr` AS `zipcode`,`kunde`.`oprettetDato` AS `creationDate`,`kunde`.`deletedDate` AS `deletedDate`,`kunde`.`approvalStatus` AS `approvalStatus` from `kunde` where ((`kunde`.`nytKundeId` = 0) and (`kunde`.`tempKundeId` = 0) and (isnull(`kunde`.`login`) or (`kunde`.`login` <> 'hest') or isnull(`kunde`.`password`) or (`kunde`.`password` <> 'WasDsaDcSadS')) and (`kunde`.`email1` <> ''))";
$from_pos = strirpos($a, ' from '); // find position of FROM
$sql = substr($a, 0, $from_pos) . ', `kunde`.`test` AS `test`' . substr($a, $from_pos);
echo $sql;
Fatal error: Uncaught Error: Call to undefined function strirpos() in /in/tvu84:4
Stack trace:
#0 {main}
thrown in /in/tvu84 on line 4
Process exited with code 255.