3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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 = strripos($a, ' from '); // find position of FROM $sql = substr($a, 0, $from_pos) . ', `kunde`.`test` AS `test`' . substr($a, $from_pos); echo $sql;
based on tvu84
Output for 5.0.0 - 7.2.0
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`, `kunde`.`test` AS `test` 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` <> ''))
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: strripos() in /in/Ui8lR on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: strripos() in /in/Ui8lR on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: strripos() in /in/Ui8lR on line 4