Skip to content

Commit

Permalink
examples/yaml-pipe-tpl.php - More comments
Browse files Browse the repository at this point in the history
  • Loading branch information
totten committed Dec 2, 2019
1 parent bb0d067 commit 03c5614
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion examples/yaml-pipe-tpl.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#!/usr/bin/env pogo
<?php

## This example uses several ?php directives to show that it works with templates.
## This example is decent smoke-test - it relies on several things
## - Uses multiple ?php directives
## - Uses STDIN and $argv
## - Uses a third-party library
## - Can be executed/tested with just a little bash scripting
##
## Usage: echo '{name: Alice, color: cyan}' | pogo yaml-pipe-tpl.php foo bar

#!require symfony/yaml: ~3.0
$parsed = Symfony\Component\Yaml\Yaml::parse(file_get_contents(pogo_stdin()));
Expand Down

0 comments on commit 03c5614

Please sign in to comment.