Replace Primitive with Object (174)
Note: Due to semantic differences between languages, this sample differs more than most.
Old Code
<?php
array_filter($orders,function($o) {
return 'high' === $o['priority'] ||
'rush' === $o['priority']
});
New Code
<?php
array_filter($orders,function($o) {
return $o['priority']->higherThan(new Priority('normal'));
});