This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"objects":{ | |
"customer":{ | |
"display_name":"Bobby S.", | |
"customer_id":"1", | |
"channels":[ | |
{ | |
"type":"sms", | |
"value":"+123456789" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function word_machine($operations) | |
{ | |
// split the operations into an array | |
$ops = explode(' ', $operations); | |
// initialize the stack | |
$stack = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function get_winner($board) { | |
$x_count = 0; | |
$o_count = 0; | |
// Check rows | |
for ($i = 0; $i < 3; $i++) { | |
if ($board[$i][0] == $board[$i][1] && $board[$i][1] == $board[$i][2]) { | |
if ($board[$i][0] == "X") { |