Category: Programming

This article in 50 words: I used to prefer spaces vs tabs, now I don't care so much, think it's more important that you can easily switch on a per-project basis. Have some thoughts on how conventions should be established, and I'll demonstrate bash code that can convert your codebase to a new standard.

As a Vim newbie, I'd like my Vim plugins & configuration to stay in sync between machines at home, office, my servers & a laptop. If found that a (free) Dropbox account works like a charm.

In an attempt to familiarize myself with the unfamiliar, I decided to build a fun side-project in Ruby and Vim. Effectively learning a new language, framework, and editor. Coming from Nano, Quanta, Eclipse PDT, TextMate, Netbeans; I found (Mac/g)Vim is big a step, and first two weeks you should not expect to be productive.

If you want to set up Ruby on Rails on Ubuntu Lucid from scratch, there are quite some articles online to choose from. I found most of them involve compiling, only highlight 1 aspect, or are a bit outdated. On top of that, getting it right can be hard as there are a number of issues related to Ruby and Debian/Ubuntu. This is an attempt to put all the sweet info in 1 place.

Here the notes I took during the Dutch PHP conference 2010 (#dpc10). They're not a representative summary of the event's highlights cause I could only attend 1 of 4 talks at any given time. I also filtered out things that didn't interest me personally.

I still got sites running Apache, but all new projects are launched with Nginx. I don't need many of the features that Apache offers, and the speed gain of Nginx is just tremendous. Once you've experienced it, I doubt you'll want to go back.

At our company we have a lot of uses for a solid API. We can use it to distribute config files, have servers report in, let customers edit DNS records using their own interface, etc.

The core of our new project runs on Node.js. With Node you can write very fast JavaScript programs serverside. It's pretty easy to install Node, code your program, and run it. But how do you make it run nicely in the background like a true server?

When migrating projects over to GitHub, I found there were still some passwords inside my SVN repositories. Obviously it's not good practice to store your passwords in a code repository - let alone at a remote location, so I wanted to replace all passwords. Not only in the current version, but in all commits that have been made over the past 3 years. Luckily with Git - you can.

Hi. Have you met KvzHTML? It's a standalone PHP Class for generating HTML. It's been hiding deep inside the caverns of my secret GitHub repo: kvzlib - a collection of code snippets too small or unfinished to deserve their own repository. But I find working with this class so pleasant, I thought I'd share the fun.

This is a Javascript version of the PHP function: money_format.

This is a Javascript version of the PHP function: metaphone.

This is a Javascript version of the PHP function: stream_get_line.

This is a Javascript version of the PHP function: stream_is_local.

This is a Javascript version of the PHP function: stream_context_set_params.

This is a Javascript version of the PHP function: stream_get_contents.

This is a Javascript version of the PHP function: stream_context_set_option.

This is a Javascript version of the PHP function: stream_context_set_default.

This is a Javascript version of the PHP function: stream_context_get_params.

This is a Javascript version of the PHP function: stream_context_get_options.

This is a Javascript version of the PHP function: stream_context_get_default.

This is a Javascript version of the PHP function: stream_context_create.

This is a Javascript version of the PHP function: version_compare.

This is a Javascript version of the PHP function: set_include_path.

This is a Javascript version of the PHP function: restore_include_path.

This is a Javascript version of the PHP function: get_include_path.

This is a Javascript version of the PHP function: get_extension_funcs.

This is a Javascript version of the PHP function: i18n_loc_set_default.

This is a Javascript version of the PHP function: i18n_loc_get_default.

This is a Javascript version of the PHP function: forward_static_call_array.

This is a Javascript version of the PHP function: forward_static_call.

This is a Javascript version of the PHP function: escapeshellarg.

This is a Javascript version of the PHP function: user_error.

This is a Javascript version of the PHP function: trigger_error.

This is a Javascript version of the PHP function: error_reporting.

This is a Javascript version of the PHP function: error_get_last.

This is a Javascript version of the PHP function: class_alias.

This is a Javascript version of the PHP function: bcsub.

This is a Javascript version of the PHP function: bcscale.

This is a Javascript version of the PHP function: bcround.

This is a Javascript version of the PHP function: bcmul.

This is a Javascript version of the PHP function: bcdiv.

This is a Javascript version of the PHP function: bccomp.

This is a Javascript version of the PHP function: bcadd.

This is a Javascript version of the PHP function: array_replace_recursive.

This is a Javascript version of the PHP function: array_replace.

Today I've moved all of my SVN repositories over to GitHub. 5 private reps and 4 public ones. Two of which you may know: PHP.JS and System_Daemon.

PHP 5.3 is a big leap forward for PHP and brings of a lot of neat features. However, big leaps can also mean big changes and potentially big breakage when it comes to backwards compatibiltiy.

Looking back at a great CakeFest in Berlin, I learned a lot about CakePHP and met many nice and inspiring people. Here are some conference notes I took that where particularly useful or new to me.

IDs are often numbers. Unfortunately there are only 10 digits to work with, so if you have a lot of records, IDs tend to get very lengthy. For computers that's OK. But human beings like their IDs as short as possible. So how can we make IDs shorter? Well, we could borrow characters from the alphabet as have them pose as additional numbers.... Alphabet to the rescue!

If you are in IT professionally (coding or sysadmin) you will be staring at monospaced fonts for many many hours a day. So it's probably justified to spend 2 minutes picking a very good one. It can make your work (typing ; ) just a little bit more pleasing.

This is a Javascript version of the PHP function: var_dump.

This is a Javascript version of the PHP function: is_unicode.

This is a Javascript version of the PHP function: is_resource.

This is a Javascript version of the PHP function: is_buffer.

This is a Javascript version of the PHP function: is_binary.

This is a Javascript version of the PHP function: get_resource_type.

This is a Javascript version of the PHP function: substr_replace.

This is a Javascript version of the PHP function: substr_compare.

This is a Javascript version of the PHP function: strcoll.

This is a Javascript version of the PHP function: str_word_count.

This is a Javascript version of the PHP function: str_getcsv.

This is a Javascript version of the PHP function: quoted_printable_encode.

This is a Javascript version of the PHP function: quoted_printable_decode.

This is a Javascript version of the PHP function: nl_langinfo.

This is a Javascript version of the PHP function: localeconv.

This is a Javascript version of the PHP function: convert_uuencode.

This is a Javascript version of the PHP function: runkit_superglobals.

This is a Javascript version of the PHP function: runkit_method_remove.

This is a Javascript version of the PHP function: runkit_method_rename.

This is a Javascript version of the PHP function: runkit_method_redefine.

This is a Javascript version of the PHP function: runkit_method_copy.

This is a Javascript version of the PHP function: runkit_method_add.

This is a Javascript version of the PHP function: runkit_import.

This is a Javascript version of the PHP function: runkit_function_rename.

This is a Javascript version of the PHP function: runkit_function_remove.

This is a Javascript version of the PHP function: runkit_function_redefine.

This is a Javascript version of the PHP function: runkit_function_copy.

This is a Javascript version of the PHP function: runkit_function_add.

This is a Javascript version of the PHP function: runkit_class_adopt.

This is a Javascript version of the PHP function: runkit_class_emancipate.

This is a Javascript version of the PHP function: sql_regcase.

This is a Javascript version of the PHP function: deaggregate.

This is a Javascript version of the PHP function: preg_grep.

This is a Javascript version of the PHP function: aggregation_info.

This is a Javascript version of the PHP function: aggregate_properties_by_regexp.

This is a Javascript version of the PHP function: aggregate_properties_by_list.

This is a Javascript version of the PHP function: aggregate_properties.

This is a Javascript version of the PHP function: aggregate_methods_by_regexp.

This is a Javascript version of the PHP function: aggregate_methods_by_list.

This is a Javascript version of the PHP function: aggregate_methods.

This is a Javascript version of the PHP function: aggregate_info.

This is a Javascript version of the PHP function: aggregate.

This is a Javascript version of the PHP function: gopher_parsedir.

This is a Javascript version of the PHP function: uniqid.

This is a Javascript version of the PHP function: log1p.

This is a Javascript version of the PHP function: expm1.

This is a Javascript version of the PHP function: atan2.

This is a Javascript version of the PHP function: set_time_limit.

This is a Javascript version of the PHP function: phpversion.

This is a Javascript version of the PHP function: php_ini_scanned_files.

This is a Javascript version of the PHP function: php_ini_loaded_file.

This is a Javascript version of the PHP function: ini_set.

This is a Javascript version of the PHP function: ini_restore.

This is a Javascript version of the PHP function: ini_get_all.

This is a Javascript version of the PHP function: ini_get.

This is a Javascript version of the PHP function: ini_alter.

This is a Javascript version of the PHP function: getlastmod.

This is a Javascript version of the PHP function: get_required_files.

This is a Javascript version of the PHP function: get_defined_constants.

This is a Javascript version of the PHP function: get_cfg_var.

This is a Javascript version of the PHP function: assert_options.

This is a Javascript version of the PHP function: assert.

This is a Javascript version of the PHP function: register_shutdown_function.

This is a Javascript version of the PHP function: rewind.

This is a Javascript version of the PHP function: realpath.

This is a Javascript version of the PHP function: readfile.

This is a Javascript version of the PHP function: popen.

This is a Javascript version of the PHP function: pclose.

This is a Javascript version of the PHP function: ftell.

This is a Javascript version of the PHP function: fseek.

This is a Javascript version of the PHP function: fread.

This is a Javascript version of the PHP function: fpassthru.

This is a Javascript version of the PHP function: fopen.

This is a Javascript version of the PHP function: filemtime.

This is a Javascript version of the PHP function: fgetss.

This is a Javascript version of the PHP function: fgets.

This is a Javascript version of the PHP function: fgetcsv.

This is a Javascript version of the PHP function: fgetc.

This is a Javascript version of the PHP function: feof.

This is a Javascript version of the PHP function: fclose.

This is a Javascript version of the PHP function: set_exception_handler.

This is a Javascript version of the PHP function: restore_exception_handler.

This is a Javascript version of the PHP function: idate.

This is a Javascript version of the PHP function: gmstrftime.

This is a Javascript version of the PHP function: gmmktime.

This is a Javascript version of the PHP function: gettimeofday.

This is a Javascript version of the PHP function: date_parse.

This is a Javascript version of the PHP function: ctype_xdigit.

This is a Javascript version of the PHP function: ctype_upper.

This is a Javascript version of the PHP function: ctype_space.

This is a Javascript version of the PHP function: ctype_punct.

This is a Javascript version of the PHP function: ctype_print.

This is a Javascript version of the PHP function: ctype_lower.

This is a Javascript version of the PHP function: ctype_graph.

This is a Javascript version of the PHP function: ctype_digit.

This is a Javascript version of the PHP function: ctype_cntrl.

This is a Javascript version of the PHP function: ctype_alnum.

This is a Javascript version of the PHP function: ctype_alpha.

This is a Javascript version of the PHP function: classkit_method_rename.

This is a Javascript version of the PHP function: classkit_method_redefine.

This is a Javascript version of the PHP function: classkit_method_remove.

This is a Javascript version of the PHP function: classkit_method_copy.

This is a Javascript version of the PHP function: classkit_method_add.

This is a Javascript version of the PHP function: classkit_import.

This is a Javascript version of the PHP function: array_multisort.

This is a Javascript version of the PHP function: setlocale.

This is a Javascript version of the PHP function: putenv.

This is a Javascript version of the PHP function: getenv.

This is a Javascript version of the PHP function: strftime.

This is a Javascript version of the PHP function: localtime.

This is a Javascript version of the PHP function: gmdate.

This is a Javascript version of the PHP function: date_default_timezone_set.

This is a Javascript version of the PHP function: date_default_timezone_get.

This is a Javascript version of the PHP function: timezone_identifiers_list.

This is a Javascript version of the PHP function: is_callable.

This is a Javascript version of the PHP function: timezone_abbreviations_list.

This is a Javascript version of the PHP function: get_declared_classes.

This is a Javascript version of the PHP function: import_request_variables.

This is a Javascript version of the PHP function: get_object_vars.

This is a Javascript version of the PHP function: get_class_vars.

This is a Javascript version of the PHP function: get_class_methods.

This is a Javascript version of the PHP function: vprintf.

This is a Javascript version of the PHP function: strncmp.

This is a Javascript version of the PHP function: usleep.

This is a Javascript version of the PHP function: time_sleep_until.

This is a Javascript version of the PHP function: time_nanosleep.

This is a Javascript version of the PHP function: settype.

This is a Javascript version of the PHP function: is_real.

This is a Javascript version of the PHP function: doubleval.

This is a Javascript version of the PHP function: parse_url.

This is a Javascript version of the PHP function: php_strip_whitespace.

This is a Javascript version of the PHP function: strnatcasecmp.

This is a Javascript version of the PHP function: natsort.

This is a Javascript version of the PHP function: natcasesort.

This is a Javascript version of the PHP function: usort.

This is a Javascript version of the PHP function: uasort.

This is a Javascript version of the PHP function: json_encode.

This is a Javascript version of the PHP function: json_decode.

This is a Javascript version of the PHP function: rawurlencode.

This is a Javascript version of the PHP function: rawurldecode.

This is a Javascript version of the PHP function: get_meta_tags.

This is a Javascript version of the PHP function: uksort.

This is a Javascript version of the PHP function: asort.

This is a Javascript version of the PHP function: arsort.

This is a Javascript version of the PHP function: array_uintersect_uassoc.

This is a Javascript version of the PHP function: array_uintersect_assoc.

This is a Javascript version of the PHP function: array_udiff_uassoc.

This is a Javascript version of the PHP function: array_udiff_assoc.

This is a Javascript version of the PHP function: array_udiff.

This is a Javascript version of the PHP function: array_intersect_ukey.

This is a Javascript version of the PHP function: array_intersect_uassoc.

This is a Javascript version of the PHP function: array_diff_ukey.

This is a Javascript version of the PHP function: array_diff_uassoc.

This is a Javascript version of the PHP function: strcspn.

This is a Javascript version of the PHP function: lcfirst.

This is a Javascript version of the PHP function: strval.

This is a Javascript version of the PHP function: array_uintersect.

This is a Javascript version of the PHP function: array_intersect_key.

This is a Javascript version of the PHP function: array_intersect_assoc.

This is a Javascript version of the PHP function: array_intersect.

Everyone knows PHP can be used to create websites. But it can also be used to create desktop applications and commandline tools. And now with a class called System_Daemon, you can even create daemons using nothing but PHP. And did I mention it was easy?

This is a Javascript version of the PHP function: vsprintf.

This is a Javascript version of the PHP function: strtr.

This is a Javascript version of the PHP function: strtok.

This is a Javascript version of the PHP function: strrchr.

This is a Javascript version of the PHP function: str_shuffle.

This is a Javascript version of the PHP function: setrawcookie.

This is a Javascript version of the PHP function: extract.

This is a Javascript version of the PHP function: pathinfo.

This is a Javascript version of the PHP function: prev.

This is a Javascript version of the PHP function: pos.

This is a Javascript version of the PHP function: next.

This is a Javascript version of the PHP function: key.

This is a Javascript version of the PHP function: current.

This is a Javascript version of the PHP function: exit.

This is a Javascript version of the PHP function: die.

This is a Javascript version of the PHP function: get_defined_vars.

This is a Javascript version of the PHP function: strtotime.

This is a Javascript version of the PHP function: call_user_func.

This is a Javascript version of the PHP function: property_exists.

This is a Javascript version of the PHP function: method_exists.

This is a Javascript version of the PHP function: class_exists.

This is a Javascript version of the PHP function: strspn.

This is a Javascript version of the PHP function: get_defined_functions.

This is a Javascript version of the PHP function: func_num_args.

This is a Javascript version of the PHP function: func_get_args.

This is a Javascript version of the PHP function: func_get_arg.

This is a Javascript version of the PHP function: array_splice.

This is a Javascript version of the PHP function: is_scalar.

This is a Javascript version of the PHP function: is_long.

This is a Javascript version of the PHP function: is_integer.

This is a Javascript version of the PHP function: is_float.

This is a Javascript version of the PHP function: is_double.

This is a Javascript version of the PHP function: gettype.

This is a Javascript version of the PHP function: each.

This is a Javascript version of the PHP function: microtime.

This is a Javascript version of the PHP function: getdate.

This is a Javascript version of the PHP function: get_headers.

This is a Javascript version of the PHP function: quotemeta.

This is a Javascript version of the PHP function: chop.

This is a Javascript version of the PHP function: constant.

This is a Javascript version of the PHP function: define.

Writing code requires two important things: creativity & discipline. The creativity to create the unknown, unexplored, exciting parts of software. And the discipline to create the dull & all-too-well-known parts of software / documentation.
You may come up with new ways (or use frameworks) to reduce repetitive work. Effectively beating discipline with creativity. But boring stuff will still always be there in some form. And on days when creativity is low, you may need to tap into that jar of discipline so you can still be productive, by doing things you never feel like.
But every now & then, there is a day when both ...


This is a Javascript version of the PHP function: chunk_split.

This is a Javascript version of the PHP function: array_merge_recursive.

This is a Javascript version of the PHP function: array_merge.

This is a Javascript version of the PHP function: array_filter.

This is a Javascript version of the PHP function: array_fill_keys.

This is a Javascript version of the PHP function: filesize.

This is a Javascript version of the PHP function: file_exists.

This is a Javascript version of the PHP function: array_slice.

This is a Javascript version of the PHP function: get_html_translation_table.

This is a Javascript version of the PHP function: log10.

This is a Javascript version of the PHP function: sleep.

This is a Javascript version of the PHP function: is_bool.

This is a Javascript version of the PHP function: mt_rand.

This is a Javascript version of the PHP function: mt_getrandmax.

This is a Javascript version of the PHP function: lcg_value.

This is a Javascript version of the PHP function: is_nan.

This is a Javascript version of the PHP function: is_infinite.

This is a Javascript version of the PHP function: is_finite.

This is a Javascript version of the PHP function: hypot.

This is a Javascript version of the PHP function: getrandmax.

This is a Javascript version of the PHP function: octdec.

This is a Javascript version of the PHP function: bindec.

This is a Javascript version of the PHP function: base_convert.

This is a Javascript version of the PHP function: decoct.

This is a Javascript version of the PHP function: decbin.

This is a Javascript version of the PHP function: hexdec.

This is a Javascript version of the PHP function: dechex.

This is a Javascript version of the PHP function: rad2deg.

This is a Javascript version of the PHP function: deg2rad.

This is a Javascript version of the PHP function: fmod.

This is a Javascript version of the PHP function: tanh.

This is a Javascript version of the PHP function: tan.

This is a Javascript version of the PHP function: sqrt.

This is a Javascript version of the PHP function: sinh.

This is a Javascript version of the PHP function: sin.

This is a Javascript version of the PHP function: pow.

This is a Javascript version of the PHP function: pi.

This is a Javascript version of the PHP function: log.

This is a Javascript version of the PHP function: floor.

This is a Javascript version of the PHP function: exp.

This is a Javascript version of the PHP function: cosh.

This is a Javascript version of the PHP function: cos.

This is a Javascript version of the PHP function: ceil.

This is a Javascript version of the PHP function: atanh.

This is a Javascript version of the PHP function: atan.

This is a Javascript version of the PHP function: asinh.

This is a Javascript version of the PHP function: asin.

This is a Javascript version of the PHP function: acosh.

This is a Javascript version of the PHP function: acos.

This is a Javascript version of the PHP function: strncasecmp.

This is a Javascript version of the PHP function: min.

This is a Javascript version of the PHP function: max.

Working with trees When working with tree data structures you often need to craft them in different ways. PHP offers a lot of functions to change the shape of arrays, but often they only go 1 level deep. Trees can count an almost infinite number of levels. Hence we need recursive replacements for our beloved array & string functions.

Working with trees When working with tree data structures you often need to craft them in different ways. PHP offers a lot of functions to change the shape of arrays, but often they only go 1 level deep. Trees can count an almost infinite number of levels. Hence we need recursive replacements for our beloved array functions.

This is a Javascript version of the PHP function: create_function.

This is a Javascript version of the PHP function: array_walk_recursive.

This is a Javascript version of the PHP function: array_walk.

This is a Javascript version of the PHP function: time.

This is a Javascript version of the PHP function: ksort.

This is a Javascript version of the PHP function: krsort.

This is a Javascript version of the PHP function: sort.

This is a Javascript version of the PHP function: rsort.

This is a Javascript version of the PHP function: is_int.

This is a Javascript version of the PHP function: htmlspecialchars_decode.

This is a Javascript version of the PHP function: htmlspecialchars.

This is a Javascript version of the PHP function: array.

This is a Javascript version of the PHP function: dirname.

This is a Javascript version of the PHP function: var_export.

This is a Javascript version of the PHP function: strchr.

This is a Javascript version of the PHP function: urlencode.

This is a Javascript version of the PHP function: urldecode.

This is a Javascript version of the PHP function: sizeof.

This is a Javascript version of the PHP function: round.

Hello good people. Our little project is going strong and thanks to Felix Geisendörfer there are a couple of new developments that I want to share with you. I'll limit this article to SVN though.

I've been programming a lot with Quanta which is a leightweight kdevelop based IDE. It did the trick for quite some time, but recent developments in my coding life like SVN brought me on a Quest for my new ultimate PHP IDE.

This is a Javascript version of the PHP function: long2ip.

This is a Javascript version of the PHP function: ip2long.

This is a Javascript version of the PHP function: echo.

Thanks to a lot of extra effort by Michael White (http://crestidg.com) there now is a namespaced version of PHP.JS available for your coding pleasure.

This is a Javascript version of the PHP function: html_entity_decode.

This is a Javascript version of the PHP function: call_user_func_array.

This is a Javascript version of the PHP function: strpbrk.

This is a Javascript version of the PHP function: array_reduce.

This is a Javascript version of the PHP function: print_r.

This is a Javascript version of the PHP function: floatval.

This is a Javascript version of the PHP function: require_once.

This is a Javascript version of the PHP function: require.

This is a Javascript version of the PHP function: get_included_files.

This is a Javascript version of the PHP function: unserialize.

This is a Javascript version of the PHP function: http_build_query.

This is a Javascript version of the PHP function: intval.

This is a Javascript version of the PHP function: is_string.

This is a Javascript version of the PHP function: is_object.

This is a Javascript version of the PHP function: is_null.

This is a Javascript version of the PHP function: parse_str.

This is a Javascript version of the PHP function: bin2hex.

This is a Javascript version of the PHP function: join.

This is a Javascript version of the PHP function: split.

This is a Javascript version of the PHP function: str_ireplace.

This is a Javascript version of the PHP function: str_split.

This is a Javascript version of the PHP function: strnatcmp.

This is a Javascript version of the PHP function: stripos.

This is a Javascript version of the PHP function: strcasecmp.

This is a Javascript version of the PHP function: substr.

This is a Javascript version of the PHP function: sha1_file.

This is a Javascript version of the PHP function: md5_file.

This is a Javascript version of the PHP function: compact.

This is a Javascript version of the PHP function: array_rand.

This is a Javascript version of the PHP function: array_product.

This is a Javascript version of the PHP function: mktime.

This is a Javascript version of the PHP function: strripos.

This is a Javascript version of the PHP function: array_reverse.

This is a Javascript version of the PHP function: array_map.

This is a Javascript version of the PHP function: array_flip.

Licensing Since the project is really kicking off and we're almost at 100 ported functions, I thought it was probably time to think about licensing. So I did a little bit of research, and I think the MIT license might be what we're looking for.

This is a Javascript version of the PHP function: strcmp.

This is a Javascript version of the PHP function: range.

This is a Javascript version of the PHP function: defined.

This is a Javascript version of the PHP function: abs.

This is a Javascript version of the PHP function: array_pad.

This is a Javascript version of the PHP function: array_fill.

This is a Javascript version of the PHP function: get_class.

This is a Javascript version of the PHP function: count_chars.

This is a Javascript version of the PHP function: array_diff_key.

This is a Javascript version of the PHP function: array_count_values.

This is a Javascript version of the PHP function: array_change_key_case.

This is a Javascript version of the PHP function: preg_quote.

This is a Javascript version of the PHP function: stristr.

This is a Javascript version of the PHP function: array_values.

This is a Javascript version of the PHP function: array_keys.

This is a Javascript version of the PHP function: file.

This is a Javascript version of the PHP function: file_get_contents.

This is a Javascript version of the PHP function: substr_count.

This is a Javascript version of the PHP function: strstr.

This is a Javascript version of the PHP function: strrev.

This is a Javascript version of the PHP function: shuffle.

This is a Javascript version of the PHP function: sha1.

This is a Javascript version of the PHP function: setcookie.

This is a Javascript version of the PHP function: isset.

This is a Javascript version of the PHP function: serialize.

This is a Javascript version of the PHP function: printf.

This is a Javascript version of the PHP function: strrpos.

This is a Javascript version of the PHP function: strpos.

This is a Javascript version of the PHP function: strlen.

This is a Javascript version of the PHP function: sprintf.

This is a Javascript version of the PHP function: rand.

This is a Javascript version of the PHP function: number_format.

This is a Javascript version of the PHP function: htmlentities.

This is a Javascript version of the PHP function: md5.

This is a Javascript version of the PHP function: levenshtein.

This is a Javascript version of the PHP function: date.

This is a Javascript version of the PHP function: checkdate.

This is a Javascript version of the PHP function: array_unique.

This is a Javascript version of the PHP function: array_unshift.

This is a Javascript version of the PHP function: array_sum.

This is a Javascript version of the PHP function: array_shift.

This is a Javascript version of the PHP function: reset.

This is a Javascript version of the PHP function: array_diff_assoc.

This is a Javascript version of the PHP function: array_key_exists.

This is a Javascript version of the PHP function: in_array.

This is a Javascript version of the PHP function: array_diff.

This is a Javascript version of the PHP function: ucfirst.

This is a Javascript version of the PHP function: array_chunk.

This is a Javascript version of the PHP function: empty.

This is a Javascript version of the PHP function: count.

This is a Javascript version of the PHP function: end.

This is a Javascript version of the PHP function: str_repeat.

This is a Javascript version of the PHP function: array_search.

This is a Javascript version of the PHP function: array_push.

This is a Javascript version of the PHP function: array_pop.

This is a Javascript version of the PHP function: array_combine.

This is a Javascript version of the PHP function: utf8_encode.

This is a Javascript version of the PHP function: utf8_decode.

This is a Javascript version of the PHP function: include_once.

This is a Javascript version of the PHP function: include.

This is a Javascript version of the PHP function: rtrim.

This is a Javascript version of the PHP function: ltrim.

This is a Javascript version of the PHP function: strip_tags.

This is a Javascript version of the PHP function: soundex.

This is a Javascript version of the PHP function: str_rot13.

This is a Javascript version of the PHP function: str_replace.

This is a Javascript version of the PHP function: ucwords.

This is a Javascript version of the PHP function: strtoupper.

This is a Javascript version of the PHP function: strtolower.

This is a Javascript version of the PHP function: implode.

This is a Javascript version of the PHP function: nl2br.

This is a Javascript version of the PHP function: is_numeric.

This is a Javascript version of the PHP function: crc32.

This is a Javascript version of the PHP function: wordwrap.

This is a Javascript version of the PHP function: stripslashes.

This is a Javascript version of the PHP function: addslashes.

This is a Javascript version of the PHP function: explode.

This is a Javascript version of the PHP function: str_pad.

This is a Javascript version of the PHP function: chr.

This is a Javascript version of the PHP function: ord.

This is a Javascript version of the PHP function: is_array.

This is a Javascript version of the PHP function: base64_decode.

This is a Javascript version of the PHP function: base64_decode.

This is a Javascript version of the PHP function: trim.

This is a Javascript version of the PHP function: function_exists.

This is a Javascript version of the PHP function: basename.

I recently faced a programming challenge that almost broke my brain. I needed to create a function that could explode any single-dimensional array into a full blown tree structure, based on the delimiters found in it's keys. Tricky part was size of the tree could be infinite. I called the function: explodeTree. And maybe it's best to first look at an example.

Not everyone knows about PHP's capabilities of making SSH connections and executing remote commands, but it can be very useful. I've been using it a lot in PHP CLI applications that I run from cronjobs, but initially it was a pain to get it to work. The PHP manual on Secure Shell2 Functions is not very practicle or thorough for that matter, so I would like to share my knowledge in this how to, to make it a little less time consuming setting this up.