3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php Echo "Luni"."<br/>"; $shift1 = array("Fam. Stoica", "Miu Marian", "Vladescu Alina", "Artemiza Rusu", "Bobe Zaharia", "Stoica Angela", "Mihalcea Jana",); $rand_keys = array_rand($shift1, 2); $lunidimineata1 = $shift1[$rand_keys[0]]; $lunidimineata2 =$shift1[$rand_keys[1]]; //Family protection Module if (preg_match("/Fam/i", $lunidimineata1)) { $lunidimineata2 = NULL; }elseif (preg_match("/Fam/i", $lunidimineata2)) { $lunidimineata1 = NULL; }else { //Shift Insurance Module $lunidimineata1 != $lunidimineata2; } $lunidimineata = ($lunidimineata1 . "\n /\n" . $lunidimineata2); echo $lunidimineata; echo "<br/>"; /////////////Shift Change $shift2brut = array("Fam. Stoica", "Barbu Verona", "Vladescu Alina", "Maga Aurora", "Bobe Zaharia", "Stoica Angela", "Mihalcea Jana", "Adrian Ionita"); //Daily Insurance Module $daily_insurance_module1 = array ($lunidimineata1, $lunidimineata2); $shift2 = array_diff ( $shift2brut, $daily_insurance_module1); $rand_keys = array_rand($shift2, 2); $luniamiaza1 = $shift2[$rand_keys[0]]; $luniamiaza2 =$shift2[$rand_keys[1]]; //Family protection Module if (preg_match("/Fam/i", $luniamiaza1)) { $luniamiaza2 = NULL; }elseif (preg_match("/Fam/i", $luniamiaza2)) { $luniamiaza1 = NULL; }else { //Shift Insurance Module $luniamiaza1 != $luniamiaza2; } $luniamiaza = ($luniamiaza1 . "\n /\n" . $luniamiaza2); //Update Daily Insurance Module $shift2_insurance_module= array ($luniamiaza1, $luniamiaza2); $daily_insurance_module2= array_merge ($daily_insurance_module1, $shift2_insurance_module); echo $luniamiaza; echo "<br/>"; /////////////Shift Change $shift3brut = array("Fam. Stoica", "Barbu Verona", "Vladescu Alina", "Purcaroiu Angela", "Stoica Angela", "Mihalcea Jana", "Macris Ionatan", ); //Daily Insurance Module $shift3 = array_diff ( $shift3brut, $daily_insurance_module2); $rand_keys = array_rand($shift3, 2); $lunidupamasa1 = $shift3[$rand_keys[0]]; $lunidupamasa2 =$shift3[$rand_keys[1]]; //Family protection Module if (preg_match("/Fam/i", $lunidupamasa1)) { $lunidupamasa2 = NULL; }elseif (preg_match("/Fam/i", $lunidupamasa2)) { $lunidupamasa1 = NULL; }else { //Shift Insurance Module $lunidupamasa1 != $lunidupamasa2; } $lunidupamasa = ($lunidupamasa1 . "\n /\n" . $lunidupamasa2); //Update Daily Insurance Module $shift3_insurance_module= array ($lunidupamasa1, $lunidupamasa2); $daily_insurance_module3= array_merge ($daily_insurance_module2, $shift3_insurance_module); $lunidupamasa = ($lunidupamasa1 . "\n /\n" . $lunidupamasa2); echo $lunidupamasa; echo "<br/>"; /////////////Shift Change $shift4brut = array("Fam. Ivan", "Miu Marian", "Stoica Angela", "Mihalcea Jana", "Macris Ionatan"); //Daily Insurance Module $shift4 = array_diff ( $shift4brut, $daily_insurance_module3); $rand_keys = array_rand($shift4, 2); $luniseara1 = $shift4[$rand_keys[0]]; $luniseara2 =$shift4[$rand_keys[1]]; //Family protection Module if (preg_match("/Fam/i", $luniseara1)) { $luniseara2 = NULL; }elseif (preg_match("/Fam/i", $luniseara2)) { $luniseara1 = NULL; }else { //Shift Insurance Module $luniseara1 != $luniseara2; } $luniseara = ($luniseara1 . "\n /\n" . $luniseara2); //Update Insurance Modules $shift4_insurance_module= array ($luniseara1, $luniseara2); $daily_insurance_module4= array_merge ($daily_insurance_module3, $shift4_insurance_module); $luniseara = ($luniseara1 . "\n /\n" . $luniseara2); echo $luniseara; echo "<br/>"; echo "<br/>"; //O Noua Zi///////////////////////////////////////////////////////////////////////////////////// //Acelasi prieten/////////////////////////////////////////////////////////////////////////////// echo "Marti"."<br/>"; $shift_ma1brut = array("Ungureanu Sorina", "Vladescu Alina", "Geta Raducanu", "Bobe Zaharia", "Estera Giubegeanu", "Mihalcea Jana"); //Daily Insurance Module $shift_ma1 = array_diff ( $shift_ma1brut, $daily_insurance_module4); $rand_keys = array_rand($shift_ma1, 2); $martidimi1 = $shift_ma1[$rand_keys[0]]; $martidimi2 =$shift_ma1[$rand_keys[1]]; //Family protection Module if (preg_match("/Fam/i", $martidimi1)) { $martidimi2 = NULL; }elseif (preg_match("/Fam/i", $martidimi2)) { $martidimi1 = NULL; }else { //Shift Insurance Module $martidimi1 != $martidimi2; } $martidimi = ($martidimi1 . "\n /\n" . $martidimi2); //Update Insurance Modules $martidimi_insurance_module= array ($martidimi1, $martidimi2); $daily_insurance_martidimi= array_merge ($martidimi_insurance_module, $daily_insurance_module4); echo $martidimi; echo "<br/>"; ///////Shift Change////// $shift_ma2brut = array( "Vladescu Alina", "Carstea Cristina", "Simona Saptifrati", "Maga Aurora", "Geta Raducanu", "Bobe Zaharia", "Fam. Opris", "Mihalcea Jana"); //Daily Insurance Module $shift_ma2 = array_diff ( $shift_ma2brut, $daily_insurance_martidimi); $rand_keys = array_rand($shift_ma2, 2); $martiamiaz1 = $shift_ma2[$rand_keys[0]]; $martiamiaz2 =$shift_ma2[$rand_keys[1]]; //Family protection Module if (preg_match("/Fam/i", $martiamiaz1)) { $martiamiaz2 = NULL; }elseif (preg_match("/Fam/i", $martiamiaz2)) { $martiamiaz1 = NULL; }else { //Shift Insurance Module $martiamiaz1 != $martiamiaz2; } $martiamiaz = ($martiamiaz1 . "\n /\n" . $martiamiaz2); //Update Insurance Modules $martiamiaz_insurance_module= array ($martiamiaz1, $martiamiaz2); $daily_insurance_martiamiaz= array_merge ($martiamiaz_insurance_module, $daily_insurance_martidimi); echo $martiamiaz; echo "<br/>"; ///////Shift Change////// $shift_ma3brut = array( "Fam. Stoica", "Miu Marian", "Vladescu Alina", "Artemiza Rusu", "Purcaroiu Angela", "Geta Raducanu", "Fam. Opris", "Mihalcea Jana"); //Daily Insurance Module $shift_ma3 = array_diff ( $shift_ma3brut, $daily_insurance_martiamiaz); $rand_keys = array_rand($shift_ma3, 2); $martidupamasa1 = $shift_ma3[$rand_keys[0]]; $martidupamasa2 =$shift_ma3[$rand_keys[1]]; //Family protection Module if (preg_match("/Fam/i", $martidupamasa1)) { $martidupamasa2 = NULL; }elseif (preg_match("/Fam/i", $martidupamasa2)) { $martidupamasa1 = NULL; }else { //Shift Insurance Module $martidupamasa1 != $martidupamasa2; } $martidupamasa = ($martidupamasa1 . "\n /\n" . $martidupamasa2); //Update Insurance Modules $martidupamasa_insurance_module= array ($martidupamasa1, $martidupamasa2); $daily_insurance_martidupamasa= array_merge ($martidupamasa_insurance_module, $daily_insurance_martiamiaz); echo $martidupamasa; echo "<br/>"; ///////Shift Change////// $shift_ma4brut = array ("Fam. Ivan", "Bozianu Cornelia", "Elena Pavel", "Dumitru Olimpia", "Geta Raducanu", "Mihalcea Jana"); //Daily Insurance Module $shift_ma4 = array_diff ( $shift_ma4brut, $daily_insurance_martidupamasa); $rand_keys = array_rand($shift_ma4, 2); $martiseara1 = $shift_ma4[$rand_keys[0]]; $martiseara2 =$shift_ma4[$rand_keys[1]]; //Family protection Module if (preg_match("/Fam/i", $martiseara1)) { $martiseara2 = NULL; }elseif (preg_match("/Fam/i", $martiseara2)) { $martiseara1 = NULL; }else { //Shift Insurance Module $martiseara1 != $martiseara2; } $martiseara = ($martiseara1 . "\n /\n" . $martiseara2); //Update Insurance Modules $martiseara_insurance_module= array ($martiseara1, $martiseara2); $daily_insurance_martiseara= array_merge ($martiseara_insurance_module, $daily_insurance_martidupamasa); $marti_insurance_module = array_diff ($daily_insurance_martiseara, $daily_insurance_module4); echo $martiseara; echo "<br/>"; echo "<br/>"; //////////////////////////////////////////////////////////////////////////////////////////////// //O Noua Zi///////////////////////////////////////////////////////////////////////////////////// //Acelasi prieten/////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////// echo "Miercuri"."<br/>"; $shiftmi1brut = array ("Miu Marian", "Vladescu Alina", "Artemiza Rusu", "Maga Aurora", "Bobe Zaharia", "Stoica Angela", "Fam. Anghel", "Mihalcea Jana"); //Daily Insurance Module; $shift_mi1 = array_diff ( $shiftmi1brut, $marti_insurance_module); $rand_keys = array_rand($shift_mi1, 2); $miercuridimi1 = $shift_mi1[$rand_keys[0]]; $miercuridimi2 =$shift_mi1[$rand_keys[1]]; //Family protection Module if (preg_match("/Fam/i", $miercuridimi1)) { $miercuridimi2 = NULL; }elseif (preg_match("/Fam/i", $miercuridimi2)) { $miercuridimi1 = NULL; }else { //Shift Insurance Module $miercuridimi1 != $miercuridimi2; } $miercuridimi = ($miercuridimi1 . "\n /\n" . $miercuridimi2); //Update Insurance Modules $miercuridimi_insurance_module= array ($miercuridimi1, $miercuridimi2); $daily_insurance_miercuridimi = array_merge ($miercuridimi_insurance_module, $marti_insurance_module); echo $miercuridimi; echo "<br/>"; $shift_mi2brut = array ("Vladescu Alina", "Carstea Cristina", "Minea Catalina", "Olariu Mihaela", "Floarea Alina", "Toi Daniela", "Bobe Zaharia", "Stoica Angela", "Fam. Anghel", "Mihalcea Jana", "Petrescu Larissa", "Adrian Ionita"); //Daily Insurance Module $shift_mi2 = array_diff ( $shift_mi2brut, $daily_insurance_miercuridimi); $rand_keys = array_rand($shift_mi2, 2); $miercuriamiaz1 = $shift_mi2[$rand_keys[0]]; $miercuriamiaz2 =$shift_mi2[$rand_keys[1]]; //Family protection Module if (preg_match("/Fam/i", $miercuriamiaz1)) { $miercuriamiazi2 = NULL; }elseif (preg_match("/Fam/i", $miercuriamiaz2)) { $miercuriamiaz1 = NULL; }else { //Shift Insurance Module $miercuriamiaz1 != $miercuriamiaz2; } $miercuriamiaz = ($miercuriamiaz1 . "\n /\n" . $miercuriamiaz2); //Update Insurance Modules $miercuriamiaz_insurance_module= array ($miercuriamiaz1, $miercuriamiaz2); $daily_insurance_miercuriamiaz = array_merge ($miercuriamiaz_insurance_module, $daily_insurance_miercuridimi); echo $miercuriamiaz; echo "<br/>"; ////////////////////////// ///////Shift Change/////// ////////////////////////// $shift_mi3brut = array("Minea Catalina", "Olariu Mihaela", "Toi Daniela", "Purcaroiu Angela", "Stoica Angela", "Mihalcea Jana"); //Daily Insurance Module $shift_mi3 = array_diff ( $shift_mi3brut, $daily_insurance_miercuriamiaz); $rand_keys = array_rand($shift_mi3, 2); $miercuridupamasa1 = $shift_mi3[$rand_keys[0]]; $miercuridupamasa2 =$shift_mi3[$rand_keys[1]]; //Family protection Module if (preg_match("/Fam/i", $miercuridupamasa1)) { $miercuridupamasa2 = NULL; }elseif (preg_match("/Fam/i", $miercuridupamasa2)) { $miercuridupamasa1 = NULL; }else { //Shift Insurance Module $miercuridupamasa1 != $miercuridupamasa2; } $miercuridupamasa = ($miercuridupamasa1 . "\n /\n" . $miercuridupamasa2); //Update Insurance Modules $miercuridupamasa_insurance_module= array ($miercuridupamasa1, $miercuridupamasa2); $daily_insurance_miercuridupamasa = array_merge ($miercuridupamasa_insurance_module, $daily_insurance_miercuriamiaz); echo $miercuridupamasa; echo "<br/>"; ///////Shift Change////// $shift_mi4brut = array("Elena Pavel", "Toi Daniela", "Stoica Angela", "Mihalcea Jana"); //Daily Insurance Module $shift_mi4 = array_diff ( $daily_insurance_miercuridupamasa, $shift_mi4brut); $rand_keys = array_rand($shift_mi4, 2); $miercuriseara1 = $shift_mi4[$rand_keys[0]]; $miercuriseara2 =$shift_mi4[$rand_keys[1]]; //Family protection Module if (preg_match("/Fam/i", $miercuriseara1)) { $miercuriseara2 = NULL; }elseif (preg_match("/Fam/i", $miercuriseara2)) { $miercuriseara1 = NULL; }else { //Shift Insurance Module $miercuriseara1 != $miercuriseara2; } $miercuriseara = ($miercuriseara1 . "\n /\n" . $miercuriseara2); //Update Insurance Modules $miercuriseara_insurance_module= array ($miercuriseara1, $miercuriseara2); $daily_insurance_miercuriseara = array_merge ($miercuriseara_insurance_module, $daily_insurance_miercuridupamasa); $miercuri_insurance_module = array_diff ($marti_insurance_module, $daily_insurance_miercuriseara); echo $miercuriseara; echo "<br/>"; /////////////////////////////////////////////////////////////////// //O Noua Zi//////////////////////////////////////////////////////// //Acelasi prieten////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// echo "Joi"."<br/> $shift_j1brut = array ("Ungureanu Sorina", "Miu Marian", "Militaru Gina", "Vladescu Alina", "Geta Raducanu", "Bobe Zaharia", "Anghel Marius", "Mihalcea Jana"); //Daily Insurance Module $shift_j1 = array_diff ( $daily_insurance_miercuriseara, $shift_j1brut); $rand_keys = array_rand($shift_j1, 2); $joidimi1 = $shift_j1[$rand_keys[0]]; $joidimi2 =$shift_j1[$rand_keys[1]]; //Family protection Module if (preg_match("/Fam/i", $joidimi1)) { $joidimi2 = NULL; }elseif (preg_match("/Fam/i", $joidimi2)) { $joidimi1 = NULL; }else { //Shift Insurance Module $joidimi1 != $joidimi2; } $joidimi = ($joidimi1 . "\n /\n" . $joidimi2); //Update Insurance Modules $joidimi_insurance_module= array ($joidimi1, $joidimi2); $daily_insurance_joidimi = array_merge ($miercuri_insurance_module, $joidimi_insurance_module); echo $joidimi; echo "<br/>"; ////////////////////////// ///////Shift Change/////// ////////////////////////// $shift_j2brut = array("Fam. Stoica", "Barbu Verona", "Miu Marian", "Vladescu Alina", "Artemiza Rusu", "Olariu Mihaela", "Geta Raducanu", "Bobe Zaharia", "Petrescu Larissa"); //Daily Insurance Module $shift_j2 = array_diff ( $daily_insurance_joidimi, $shift_j2brut); $rand_keys = array_rand($shift_j2, 2); $joiamiaz1 = $shift_j2[$rand_keys[0]]; $joiamiaz2 =$shift_j2[$rand_keys[1]]; //Family protection Module if (preg_match("/Fam/i", $joiamiaz1)) { $joiamiaz2 = NULL; }elseif (preg_match("/Fam/i", $joiamiaz2)) { $joiamaz1 = NULL; }else { //Shift Insurance Module $joiamiaz1 != $joiamiaz2; } $joiamiaz = ($joiamiaz1 . "\n /\n" . $joiamiaz2); //Update Insurance Modules $joiamiaz_insurance_module= array ($joiamiaz1, $joiamiaz2); $daily_insurance_joiamiaz = array_merge ($daily_insurance_joidimi, $joiamiaz_insurance_module); echo $joiamiaz; echo "<br/>";
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected 'Ungureanu' (T_STRING), expecting ',' or ';' in /in/8MKXZ on line 394
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /in/8MKXZ on line 394
Process exited with code 255.