composer global require ziyadsk/dk:dev-master
echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc
dk [file] [destination]
name = "John Doe"
echo("Hello")
to
<?php
$name = "John Doe" ;
echo($name);
?>
fn print_100_times(variable){
for(i in {1..100}){
print(variable)
}
}
to
<?php
function print_100_times($variable){
for($i=0 ;$i<=100; $i++){
print($variable);
}
}
?>
for(element in my_arr){
print(element)
}
}
to
<?php
foreach($my_arr as $element){
print($element);
}
?>
class Car : Vehicule [SomeInterface,AnotherInterFace] {
static pub name = "Honda"
serial_number = "9819020Z0DJLOZEOLD"
pub fn start_engine(){}
}
myCar = new Car()
myCar->start_engine()
to
<?php
class Car extends Vehicule implements SomeInterface, AnotherInterFace {
static $name = "Honda";
private $serial_number = "9819020Z0DJLOZEOLD";
public function start_engine() {}
}
$myCar = new Car() ;
$myCar->start_engine() ;
?>
- VScode extension -> DK