3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function htmlWrapThing($html, $size){ $html = false; $i = 0; $chars = str_split($html); $return = ""; foreach($chars as $char){ if($char=="<") $html = true; if($char==">") $html = false; if(!$html) $i++; $return .= $char; if($i==$size){ $return .= "\r\n"; $i=0; } } return $return; } $str = "<b>~Here you go, off to compete~ <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>~Nerves stack up inside of you, getting closer and closer to bursting~ <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>~Will you pop? Or will you get yourself evened out?~ <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>~*~*~*~ </b><p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>The bright sun rays slipped through the octagon shaped windows and shined right into my eyes. I woke up <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>squinting with an explosion of bright orange and red colors behind my eyelids. This is why I should sleep with a <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>pillow over my head. I quickly took the pillow out from under my head and slammed it over my face. \"Five more minutes,\" I grumbled. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>It only took a mere five seconds before a distinct sinking feeling shot down my spine. I shot out of bed, my pillow flying somewhere in my room. \"The sunrise!\" I shrieked. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Oh no, no, no, no, no! <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>The sunrise is supposed to be the start of the training day. All the students wake up, eat breakfast in the <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Mess Hall, and are expected to be lined outside in the grass field by the time the sun is up. Here the rays have just blinded me and I'm still in bed and my pajamas. In other words, I'm not just late, I'm super late. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>The morning gong rang, sealing my fate. A gong sounds off to signal the start and end of a training day, <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>without fail, every single morning. The fact that I'm still in my disheveled state when I heard the gong means how badly things will be for me later on. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>I quickly rushed to my dresser and tried to keep it together while I changed into my workout clothes. The <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Kitsune Clan assigned every student an outfit to train in... and a purple nightgown wasn't part of the ensemble. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"How can I be late?\" I shrieked to myself, \"I've never been late before! This is impossible!\" <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Once I was dressed in my proper clothes, I skidded out of my room and down the hallway of my sector <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>house. \"Cassie-Chan! Yami-San! Luna! Are you guys here?\" I cried out. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Where were my teammates? Surely they didn't just leave me alone. Cassie or Yami are always the ones who <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>wake me up, it's been that way since day one. I've only been at this clan a month, just like my other four teammates. The five of us are considered 'fresh meat' in the clan and if a fresh meat is late for training... <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>I remembered the punishment that Kuroi once told me about: <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"One time I saw a kid do eight-hundred push-ups,\" Kuroi said gravely. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>He's my sector leader who has been here the past three years, the only senior member among us in Sector 7. \"Eight-hundred push-ups?\" I questioned back to him. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Kuroi nodded. \"He had to do two-hundred of them on his tongue.\" \"No way,\" I gaped. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"That's physically impossible,\" Yami then stated. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Kuroi shrugged his shoulders. \"Hey, I'm just telling you fresh meats what I saw.\" <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"What happened to the kid who had to do it?\" Cassie inquired, joining in my curiosity. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>My team leader threw both his hands up. \"I'm pretty sure he's dead.\" The memory ended. Oh no. I'm gonna die. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Forget calling out for my teammates. I ran to the front door, slid it open hastily, and nearly tripped out the <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>door. Maybe if I make it to the grass fields in time, I can just stand there I've like been there the whole time. But this is a shinobi clan, which makes all my teachers highly trained warriors themselves. There's no way I'm gonna slip past people of their level. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>The brisk fresh air hit my face and sent a layer of goosebumps down my arms. It was the beginning of September, the month where summer bids farewell and autumn says hello. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>I bounded down the steps of my sector house and skidded to a stop. In front of me were all five of my <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>teammates, just standing there on the front lawn of our sector house. There was Sector 7's leader, Kuroi Kaze, Teruko Cassie, Hanran Nigaru, YamiTsuki, and Yami's little sister, Luna. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Speaking of Luna, the little kid was the first one to notice me. \"Morning, Tabby-Chan!\" she exclaimed with a smile on her face. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>I looked at Luna with widened eyes. \"What are you so happy for?\" Surely she knows that our whole sector <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>was late for training and now we're all gonna die. Surely! <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Luna blinked a few times, even scratched her pixie-cut head of jet black hair. \"I guess I'm happy because I had egg drop soup for breakfast,\" she then answered, \"and I'm happy that Cassie-Chan let me brush her hair, 'cause it's really soft and stuff. Oh, and I'm happy that the bruise on my arm turned purple because I love purple! Yeah, all these things are great.\" She smiled. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>I smacked my palm to my forehead. \"No, Luna. We're all gonna die!\" I hissed. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>She looked left, looked right, left again, and back at me. \"Right now?\" <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"Don't you see? We're late for training, Luna! It's way past sunrise. Now we're gonna be punished by one of <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>the teachers, and it'll probably be Sensei Akira because she's the scariest.\" I huffed out a big breath of air. Why do I have to explain this stuff, she should know what her fate is. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Yami, Luna's older brother, stepped over closer to his sister and myself. \"Um, Tabby-Chan, you didn't see the <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>note I left you, did you?\" he asked me. I shook my head no. \"Oh, well I left you a note explaining that Sensei Akira left our sector a note,\" Yami explained. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"Ha! You left a note about leaving a note! You're so funny, bro,\" Luna chuckled. I don't recall ever seeing a note. \"I never saw one,\" I told him. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Yami bowed his head once. \"My apologies, Tabby-Chan. I thought you would see it. Nigaru-San was the first <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>one to wake up and he saw that Sensei Akira put a note on our door. She told us not to show up for training and <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>to meet her outside the sector house at 6:00 sharp.\" <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>My eyes drifted up to the skies overhead. \"That's like, forty-five minutes away,\" I awed. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Yami nodded. \"This was the first morning ever where you could have slept in. I thought you would have <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>wanted to. Sorry for making you panic.\" Yami was genuine, as he always was. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>He was my best friend in the clan, only a year younger than me at twelve compared to my thirteen. He was a <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>great companion, even if he was a little odd at times. Yami had bright silver hair and pale white skin. The best thing about him were his chocolate brown eyes; they always gleamed with care and concern. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"It's okay,\" I finally sighed, remembering how to breathe at the same time. \"I was just scared, that's all. But <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>it's alright.\" <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"Scared? Ah come on, Tabby-Chan!\" Luna exclaimed. She began to bounce back and forth on her heels and balls of her feet, until Yami held her down by putting a hand on her head. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>The little girl was the youngest member of this clan at eight years old. She was Yami's sister, however, the two <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>looked nothing alike. Where Yami was pale, Luna's skin was a dark tan. She was short and on the scrawny side, <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>with wild hair that went in every direction. It was always amusing to see the two stand side-by-side knowing that they're related. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"So what if I had written a note about Yami writing you a note?\" Luna then asked me. \"Then that would <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>mean that I wrote a note about writing a note. Ooh! And Sensei Akira wrote the original note, so that's three <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>notes.\" <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Yami patted his sister's head. \"Sorry sis, but that's not our biggest concern right now,\" he said. He turned <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>back to me, \"So what do you think is going on? I don't see any other sectors waiting outside, I think we're the <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>only ones Sensei Akira wanted to see.\" <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>I looked around me to see if he was right. The Kitsune Clan is a huge school that goes on for miles and miles, all surrounded by a jutted stone wall. There are thirteen sector houses, each built with pagoda-styled roofs and <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>wood and bamboo. The Kitsune Clan divided their students up into thirteen sectors, each sector with seven members each. All the houses are lined up in a row, therefore I would have seen if any other students were standing outside. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Yami was correct, the only ones out here were the six of us. We were Sector 7, one member short of a completed team. I thought about my answer to Yami's posing question. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"I have no idea,\" I yawned. Yeah, I didn't think about my answer for too long. Luckily, it didn't take long for the answer to present itself. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>There was a shift in the morning air. I don't know what exactly changed, I just know that something in the <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>present atmosphere wasn't the same as before. There I was, standing outside with my heart racing and <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>tiredness still in my bones. Yami and Luna were standing right in front of me, with Cassie not too far off, and <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Kuroi standing with his legs apart and arms crossed like some big shot. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>The only one who was quite a distance away was Hanran, the middle boy of our sector. Hanran was the type of guy who not only liked his space, he demanded it. He was farthest away from everyone with his back to us. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Actually, Hanran is what tipped me off in the first place. He turned his head and looked in Cassie's direction. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"Nigaru-San?\" Cassie asked after a long moment went by with Hanran still staring at her. Like me and Yami, Cassie and Hanran were close in age as well. She was sixteen and he was seventeen. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Hanran continued to be silent, however, he began to take slow and cautious steps towards us. \"It's time,\" he said in a very low voice. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Before I could ask what Hanran meant, Luna threw her arms in the air and exclaimed, \"I've got it!\" \"Got what?\" I asked her. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"I remembered the real reason why I'm so happy! It's because Nigaru-San caught a frog and he let me hold it. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>It was all slimy 'n stuff and squishy,\" Luna answered. Her brother shook his head. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"That was three weeks ago,\" Hanran merely pointed out. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"I know, I've been happy about it ever since,\" Luna grinned. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>That was all there was to say about that subject. What Hanran was referring to became obvious; Akira <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>appeared before us, the teacher we were waiting on. Just like that, our Sector 7 was in the presence of the <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Kitsune Clan's second-in-command, Akira Miyamoto herself. The woman had her fighting uniform on; a black cat suit with a crimson red sash, and two matching red straps over the shoulders to make an 'X' shape. These were not her usual clothes. She was dressed for battle. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Oh no, I realized, she's dressed for battle! <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"Hey Sensei, whaddya doing here so early?\" Kuroi then asked. For the first time that morning, I heard my <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>sector leader speak, and he still had the same brash and rude tone as last night. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Akira merely lifted an eyebrow. She slid a hand into her red sash and showed a silver kunai was between her fingers. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Kuroi cleared his throat. \"I mean, uh, morning Sensei.\" He knew that kunai threat was for him. I smirked on the inside; my team leader always tries to act like a big shot. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Everyone else was polite with their greetings, all except Hanran who chose to stay silent. Big surprise. \"I'll <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>make my point right now,\" Akira then said, her voice loud and clear. \"You're all coming with me to Viper <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Country, we're going to the Black-Sho Clan for Battle Month. We depart in fifteen minutes. Pack light and take <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>your weapons with you. Once your fifteen minutes are up, meet me at the front gates of the school. Do not <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>make me wait on you, Sector 7.\" <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Once Akira finished speaking, she turned on her heels and started to walk in the opposite direction of the sector houses. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"Wait!\" Yami shrieked. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Akira turned her head around and eyed him. \"What?\" <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Just one look from our teacher, and Yami was frozen with fear. \"U-uh-um,\" he stammered. He shook his head <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>and got himself together. \"Sensei, what exactly is Battle Month? I've never heard of this.\" <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>The shinobi woman didn't even blink. \"Kaze-San knows,\" she answered simply. \"Let him explain it.\" <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>After that, Kuroi came undone. \"Oh spirits, why do I gotta explain it?\" he growled, \"I mean, it's enough that <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>I've gotta mentor these fresh meats, now I've gotta clue them in on the obvious, too?\" <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Whish! <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Kuroi fell to the ground with a loud bang... a kunai jammed through his shirt and keeping him pinned to the <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>ground. He thrashed about, trying to loosen the kunai from the compacted dirt, but it wasn't working very well. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>I had to stop myself from laughing out loud. This was too rich! <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"Now you six only have ten minutes to pack,\" Akira then stated. She eyed Kuroi especially, \"Better talk fast.\" With that, Akira walked off. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"I swear!\" Kuroi hissed from the ground. He was a big guy; 5'10\" in height and built like a bear with all his <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>muscle. It was funny to think that a simple kunai from Akira's belt could keep him on the ground. But that <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>wasn't a surprising occurrence for Kuroi Kaze. He was the one at this school with a \"bad boy\" reputation; he <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>used to be the only one in Sector 7 until the rest of us joined about a month ago, after all. The only thing Kuroi <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>cares about is being badass which means he's a guy who just wants to fight and brawl all the time. He's so <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>annoying! <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Kuroi did manage to get himself unstuck. Except, now his shirt has a big hole in it. Just like all the other shirts he's had on when Akira threw a kunai at him. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>~*~*~*~ <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>We made our way back inside the sector house without a word. Once we were inside, it didn't take long for the chatter to start. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"Are you gonna tell us about Battle Month?\" I asked Kuroi. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>He scoffed, \"Do I look like I wanna waste my time explaining stuff to you?\" <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"You had no problem popping off to Akira,\" Hanran then commented. He spoke with his same indifferent <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>tone of voice. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Kuroi ignored the middle boy. \"Yeah, whatever. Battle Month is the biggest waste of time, ever.\" <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"Yes,\" I said, \"but what is it?\" <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>My team leader probably figured that we weren't going to stop pestering him. He went into his room (which <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>we separate by room dividers) and chose to talk when he wasn't in the open with the rest of us. \"Battle Month <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>is like a tournament. It's held by the thirteen ancient clans spread across the five countries that make up Shaaku <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Den.\" <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>I exchanged looks with Yami. We both had no idea what he just said. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>\"Wait, I'm confused, is Kaze-San telling us a story? 'Cause so far it's pretty dang boring,\" Luna commented. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>She looked hopelessly lost. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Yelling came from Kuroi's room. \"I'M TELLING YOU LOSERS WHAT BATTLE MONTH IS!\" he shouted defensively. <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Luna didn't know why he was upset. \"So tell us, old man!\" <p style=\"margin: 0px; line-height: 16px; min-height: 15px;\"></p>Kuroi stepped back out into the hallway with a new shirt on."; echo htmlWrapThing($str,10);
based on 6ljJ7
Output for 5.0.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: str_split() in /in/hCG82 on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: str_split() in /in/hCG82 on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: str_split() in /in/hCG82 on line 5